Sha256: 429c7671c95f35106c3e39f352a4258a9eeb6623ae19436418a6769214400763

Contents?: true

Size: 885 Bytes

Versions: 11

Compression:

Stored size: 885 Bytes

Contents

require File.dirname(__FILE__) + '/../../spec_helper'

describe "error_on" do
  it "should provide a description including the name of what the error is on" do
    have(1).error_on(:whatever).description.should == "should have 1 error on :whatever"
  end
  
  it "should provide a failure message including the number actually given" do
    lambda {
      [].should have(1).error_on(:whatever)
    }.should fail_with("expected 1 error on :whatever, got 0")
  end
end

describe "errors_on" do
  it "should provide a description including the name of what the error is on" do
    have(2).errors_on(:whatever).description.should == "should have 2 errors on :whatever"
  end
  
  it "should provide a failure message including the number actually given" do
    lambda {
      [1].should have(3).errors_on(:whatever)
    }.should fail_with("expected 3 errors on :whatever, got 1")
  end
end

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
dchelimsky-rspec-rails-1.1.10 spec/rails/matchers/errors_on_spec.rb
dchelimsky-rspec-rails-1.1.11.1 spec/rails/matchers/errors_on_spec.rb
dchelimsky-rspec-rails-1.1.11.2 spec/rails/matchers/errors_on_spec.rb
dchelimsky-rspec-rails-1.1.11.3 spec/rails/matchers/errors_on_spec.rb
dchelimsky-rspec-rails-1.1.11 spec/rails/matchers/errors_on_spec.rb
dchelimsky-rspec-rails-1.1.9 spec/rails/matchers/errors_on_spec.rb
rspec-rails-1.1.11 spec/rails/matchers/errors_on_spec.rb
rspec-rails-1.1.10 spec/rails/matchers/errors_on_spec.rb
rspec-rails-1.1.9 spec/rails/matchers/errors_on_spec.rb
typo-5.1.98 vendor/plugins/rspec-rails/spec/rails/matchers/errors_on_spec.rb
typo-5.2 vendor/plugins/rspec-rails/spec/rails/matchers/errors_on_spec.rb