Sha256: 80aa3c8146da9c7b334c5efc8e218df0533c99393475dfd22f43e56137f92141

Contents?: true

Size: 470 Bytes

Versions: 34

Compression:

Stored size: 470 Bytes

Contents

module ShouldaMacros
  def should_be(boolean_flag)
    should "be #{boolean_flag}" do
      assert_equal true, subject.send(boolean_flag)
    end
  end

  def should_not_be(boolean_flag)
    should "not be #{boolean_flag}" do
      assert_equal false, subject.send(boolean_flag)
    end
  end

  def should_have(attr_name, expectation)
    should "have #{attr_name} == #{expectation.inspect}" do
      assert_equal expectation, subject.send(attr_name)
    end
  end
end

Version data entries

34 entries across 28 versions & 8 rubygems

Version Path
tdiary-5.0.8 vendor/bundle/gems/tdiary-5.0.7/vendor/bundle/gems/simplecov-0.9.2/test/shoulda_macros.rb
tdiary-5.0.7 vendor/bundle/gems/simplecov-0.9.2/test/shoulda_macros.rb
tdiary-5.0.6 vendor/bundle/gems/simplecov-0.9.2/test/shoulda_macros.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/simplecov-0.9.2/test/shoulda_macros.rb
tdiary-5.0.5 vendor/bundle/gems/simplecov-0.9.2/test/shoulda_macros.rb
tdiary-5.0.4 vendor/bundle/gems/simplecov-0.9.2/test/shoulda_macros.rb
tdiary-5.0.2 vendor/bundle/gems/simplecov-0.9.2/test/shoulda_macros.rb
tdiary-5.0.1 vendor/bundle/gems/simplecov-0.9.2/test/shoulda_macros.rb
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/simplecov-0.9.0/test/shoulda_macros.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/simplecov-0.9.0/test/shoulda_macros.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/simplecov-0.9.0/test/shoulda_macros.rb
suzuko-0.1.8 vendor/bundle/ruby/2.0.0/gems/simplecov-0.10.0/test/shoulda_macros.rb
suzuko-0.1.7 vendor/bundle/ruby/2.0.0/gems/simplecov-0.10.0/test/shoulda_macros.rb
mastermind_adeybee-0.1.4 vendor/bundle/ruby/2.2.0/gems/simplecov-0.10.0/test/shoulda_macros.rb
mastermind_adeybee-0.1.3 vendor/bundle/ruby/2.2.0/gems/simplecov-0.10.0/test/shoulda_macros.rb
mastermind_adeybee-0.1.2 vendor/bundle/ruby/2.2.0/gems/simplecov-0.10.0/test/shoulda_macros.rb
mastermind_adeybee-0.1.1 vendor/bundle/ruby/2.2.0/gems/simplecov-0.10.0/test/shoulda_macros.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/simplecov-0.10.0/test/shoulda_macros.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/simplecov-0.10.0/test/shoulda_macros.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/simplecov-0.10.0/test/shoulda_macros.rb