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 'strscan' | |
| singleton = <<EOS | |
| Feature: Singletonz | |
| Scenario: Oh hai | |
| Given what is this here | |
| %_FEATURE_END_% | |
| EOS |
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 LastRequestResponse | |
| def last_request | |
| page.driver.last_request | |
| end | |
| def last_response | |
| page.driver.last_response | |
| 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
| msassak@xanthippe:~/Work/cucumber(api) $ belly | |
| /Users/msassak/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- belly/credentials (LoadError) | |
| from /Users/msassak/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' | |
| from /Users/msassak/.rvm/gems/ruby-1.8.7-p302@cucumber/gems/belly-0.5.5/bin/../lib/belly/client/config.rb:2 | |
| from /Users/msassak/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' | |
| from /Users/msassak/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' | |
| from /Users/msassak/.rvm/gems/ruby-1.8.7-p302@cucumber/gems/belly-0.5.5/bin/../lib/belly/client.rb:60 | |
| from /Users/msassak/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' | |
| from /Users/msassak/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31: |
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 'gherkin' | |
| require 'gherkin/builder' | |
| gherkin = Gherkin::Builder.new do | |
| feature "Addition" do | |
| description "In order to avoid silly mistakes..." | |
| scenario_outline "Add two numbers" do | |
| step :given, "I have entered <input_1> into the calculator" | |
| step :and, "I have entered <input_2> into the calculator" |
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
| # in feature/step_definitions/steps.rb | |
| Given "blah" do | |
| do_it | |
| end | |
| module MoreWorld | |
| extend self | |
| def do_it | |
| p "Do it" |
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
| #!/usr/bin/env ruby | |
| require 'csv' | |
| class Converter | |
| def initialize(feature) | |
| @feature = feature | |
| end | |
| def to_gherkin |
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
| $ ruby-1.8.7-p302 method_chain.rb | |
| method_chain.rb:2: syntax error, unexpected '.', expecting $end | |
| .gsub(/f/, "") | |
| ^ | |
| $ ruby-1.9.2-p0 method_chain.rb | |
| OO |
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
| | type | doors | | |
| | SD Plus™ Door | 2 | |
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(n2c). | |
| -export([n2c/1]). | |
| n2c("255.255.255.255") -> 32; | |
| n2c("255.255.255.254") -> 31; | |
| n2c("255.255.255.252") -> 30; | |
| n2c("255.255.255.248") -> 29; | |
| n2c("255.255.255.240") -> 28; | |
| n2c("255.255.255.224") -> 27; | |
| n2c("255.255.255.192") -> 26; |