Sha256: b26b5bb6623aa016afece4888024191b4c16bfde09c7c223ec84d54d4abd6da1

Contents?: true

Size: 422 Bytes

Versions: 5

Compression:

Stored size: 422 Bytes

Contents

# Added based on http://www.arctickiwi.com/blog/upgrading-to-rspec-2-with-ruby-on-rails-3
# God bless you Jonathon Horsman 
def assert_difference(executable, how_many = 1, &block)
  before = eval(executable)
  yield
  after = eval(executable)
  after.should == before + how_many
end

def assert_no_difference(executable, &block)
  before = eval(executable)
  yield
  after = eval(executable)
  after.should == before
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
blacklight-3.0.0pre6 test_support/spec/support/assert_difference.rb
blacklight-3.0.0pre4 test_support/spec/support/assert_difference.rb
blacklight-3.0.0pre3 test_support/spec/support/assert_difference.rb
blacklight-3.0pre2 test_support/spec/support/assert_difference.rb
blacklight-3.0pre1 test_app/spec/support/assert_difference.rb