Sha256: 300815c262a2bf586f655ac68071c3e4d9f9d078fc3d810f92c1ebfc337db4f2
Contents?: true
Size: 1.6 KB
Versions: 3
Compression:
Stored size: 1.6 KB
Contents
Feature: Assertions In order to get started quickly As a new Cucumber user I want to use a familiar assertion library Background: Given a file named "features/assert.feature" with: """ Feature: Assert Scenario: Passing Then it should pass """ Given a file named "without_rspec.rb" with: """ require 'rubygems' if RUBY_VERSION <= '1.8.7' require 'rspec/expectations' module RSpec remove_const :Matchers rescue nil remove_const :Expectations rescue nil end module Spec remove_const :Expectations rescue nil end """ Scenario: Test::Unit Given a file named "features/step_definitions/assert_steps.rb" with: """ Then /^it should pass$/ do assert(2 + 2 == 4) end """ When I run `ruby -r./without_rspec -S cucumber` Then it should pass with exactly: """ Feature: Assert Scenario: Passing # features/assert.feature:2 Then it should pass # features/step_definitions/assert_steps.rb:1 1 scenario (1 passed) 1 step (1 passed) 0m0.012s """ Scenario: RSpec Given a file named "features/step_definitions/assert_steps.rb" with: """ Then /^it should pass$/ do (2 + 2).should == 4 end """ When I run `cucumber` Then it should pass with exactly: """ Feature: Assert Scenario: Passing # features/assert.feature:2 Then it should pass # features/step_definitions/assert_steps.rb:1 1 scenario (1 passed) 1 step (1 passed) 0m0.012s """
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
cucumber-1.2.5 | features/assertions.feature |
cucumber-1.2.3 | features/assertions.feature |
cucumber-1.2.2 | features/assertions.feature |