Giter Site home page Giter Site logo

assert_difference's People

Contributors

pupeno avatar rrrene avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

rrrene

assert_difference's Issues

Return the return value of the block

Instead of returning a dictionary of expressions, return whatever the block returns so it's possible to do:

    email = assert_difference "ActionMailer::Base.deliveries.count" => +1 do
      Mailer.thank_you(user).deliver
    end

error when include AsserDifference in rspec

RSpec.configure do |config|
...
config.include AssertDifference
end

error : spec_helper.rb:43:in `block (2 levels) in <top (required)>': uninitialized constant AssertDifference (NameError)
Is this error only happen to me ? :D

Write tests

Go to 100% code coverage. And stay there.

Don't silently ignore expressions

Currently if you do something like

assert_difference "Exp1", "Exp2" do
  foo
end

Exp2 is ignored because it's taken as the error message. Instead one should write

assert_difference ["Exp1", "Exp2"] do
  foo
end

but there's no error pushing one to write it the correct way. Fix the API so this thing cannot happen.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.