Sha256: 237d70e5c6238bb7233399fcb7150931a6b6f05b74f3dbfa3c66aaef473c9f12

Contents?: true

Size: 788 Bytes

Versions: 4

Compression:

Stored size: 788 Bytes

Contents

Feature: expecting a matcher to change

  Scenario: when the matcher matches only after the block
    Given a file named "example_spec.rb" with:
      """ruby

        describe "adding one" do
          it "adds one" do
            x = 1
            expect { x += 1 }.to change { x }.to_now eq 2
          end
        end
      """
    When I run rspec
    Then the examples should all pass

 Scenario: failures are correctly reported
    Given a file named "example_spec.rb" with:
      """ruby

        describe "adding one" do
          it "adds one" do
            x = 1
            expect { x += 1 }.to change { x }.to_now eq 3
          end
        end
      """
    When I run rspec
    Then the output should contain "Failure/Error: expect { x += 1 }.to change { x }.to_now eq 3"

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rspec-change_to_now-1.0.3 features/change_to_now.feature
rspec-change_to_now-1.0.2 features/change_to_now.feature
rspec-change_to_now-1.0.1 features/change_to_now.feature
rspec-change_to_now-1.0.0 features/change_to_now.feature