This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'cucumber/rails/capybara' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| msassak:~/Work/gherkin(master)$ gem list albacore | |
| *** LOCAL GEMS *** | |
| albacore (0.1.2) | |
| msassak:~/Work/gherkin(master)$ irb | |
| ruby-1.8.7-p174 > require 'albacore' | |
| NameError: uninitialized constant RunCommand::AttrMethods | |
| from /home/msassak/.rvm/gems/ruby/1.8.7/gems/albacore-0.1.2/lib/albacore/support/runcommand.rb:4 | |
| from /home/msassak/.rvm/ruby-1.8.7-p174/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'cucumber' | |
| require 'cucumber/ast/table' | |
| def dittoize(table) | |
| rows = table.rows | |
| rows.each_cons(2) do |upper, lower| | |
| next unless lower.any? { |cell| cell == "''" } | |
| lower.each_with_index do |cell, idx| | |
| lower[idx] = upper[idx] if cell == "''" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Running cucumber --tags ~@wire | |
| Pre INDENT change: | |
| Failing Scenarios: | |
| cucumber features/cucumber_cli.feature:428 # Scenario: Run a single background which matches a name using --name (Useful if there is an error in it) | |
| cucumber features/default_snippets.feature:5 # Scenario: Cucumber doesn't know what language, and defaults to Ruby | |
| cucumber features/exception_in_before_block.feature:21 # Scenario: Handle Exception in standard scenario step and carry on | |
| cucumber features/exception_in_before_block.feature:47 # Scenario: Handle Exception in Before hook for Scenario with Background | |
| cucumber features/html_formatter.feature:6 # Scenario: Everything in examples/self_test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Feature: scenario outline test | |
| Scenario Outline: main table for now | |
| Given an event starts at <TimeA> in <CreateTMZ> | |
| When a user in <ViewTMZ> views the event | |
| Then it will show as starting at <TimeB> | |
| And <Note> | |
| Examples: | |
| | CreateTMZ | TimeA | ViewTMZ | TimeB | Note | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module TestWorld | |
| def log_in | |
| puts "Logging in" | |
| end | |
| def log_out | |
| puts "Logging out" | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Cucumber::Ast::Table | |
| def expand_dittos(ditto = "''") | |
| ditto_rows = rows.dup | |
| ditto_rows.each_cons(2) do |upper, lower| | |
| next unless lower.any? { |cell| cell == ditto } | |
| lower.each_with_index do |cell, idx| | |
| lower[idx] = upper[idx] if cell == ditto | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # With Gherkin 2.0 we do something like this: | |
| def parse | |
| builder = Cucumber::Parser::GherkinBuilder.new | |
| formatter_listener = Gherkin::Parser::FormatterListener.new(builder) | |
| filter_listener = Gherkin::Parser::FilterListener.new(formatter_listener, filters) | |
| parser = Gherkin::Parser::Parser.new(filter_listener, true, "root") | |
| lexer = Gherkin::I18nLexer.new(parser, false) | |
| lexer.scan(source, location, offset) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Feature: Pipes Are the Waves of the Future | |
| Scenario: This is a scenario living in a gist | |
| Given a step blah | |
| And another one | |
| Then McGlarble | |
| Scenario: Real step | |
| Then STDERR should be empty |