lib/helpers/shoulda_extensions.rb
def should_be_nil(value)
    should "be not have a value" do
      assert_nil value.class == String ? eval(value) : value
    end
  end
# asserts that a certain value should be nil
# ex. should_be_nil "@user.id"
asserts that a certain value should be nil
ex.
asserts that a certain value should be nil ex .
def should_be_nil(value)
    should "be not have a value" do
      assert_nil value.class == String ? eval(value) : value
    end
  end
def should_be_nil ( value ) should "be not have a value" do assert_nil value . class == String ? eval ( value ) : value end end
asserts that a certain value should be nil
ex.
asserts that a certain value should be nil ex .
value