Sha256: eb0170d4887a8de7563bcfc4f784b95381568d085b20755ae306919cddcf40e2

Contents?: true

Size: 362 Bytes

Versions: 61

Compression:

Stored size: 362 Bytes

Contents

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

describe "A model" do
  fixtures :things
  it "should tell you its required fields" do
    Thing.new.should have(1).error_on(:name)
  end
  
  it "should tell you how many records it has" do
    Thing.should have(:no).records
    Thing.create(:name => "THE THING")
    Thing.should have(1).record
  end
end

Version data entries

61 entries across 61 versions & 10 rubygems

Version Path
rspec-rails-1.1.5 spec/rails/extensions/active_record_spec.rb
rspec-rails-1.1.7 spec/rails/extensions/active_record_spec.rb
rspec-rails-1.1.8 spec/rails/extensions/active_record_spec.rb
spree-0.0.9 vendor/plugins/rspec_on_rails/spec/rails/extensions/active_record_spec.rb
spree-0.0.8 starter-app/vendor/plugins/rspec_on_rails/spec/rails/extensions/active_record_spec.rb
spree-0.2.0 vendor/plugins/rspec_on_rails/spec/rails/extensions/active_record_spec.rb
spree-0.4.0 vendor/plugins/rspec-rails/spec/rails/extensions/active_record_spec.rb
spree-0.4.1 vendor/plugins/rspec-rails/spec/rails/extensions/active_record_spec.rb
spree-0.5.0 vendor/plugins/rspec-rails/spec/rails/extensions/active_record_spec.rb
spree-0.5.1 vendor/plugins/rspec-rails/spec/rails/extensions/active_record_spec.rb
typo-5.0.1 vendor/plugins/rspec_on_rails/spec/rails/extensions/active_record_spec.rb
typo-5.0.2 vendor/plugins/rspec_on_rails/spec/rails/extensions/active_record_spec.rb
typo-5.0.3.98.1 vendor/plugins/rspec_on_rails/spec/rails/extensions/active_record_spec.rb
typo-5.0.3.98 vendor/plugins/rspec_on_rails/spec/rails/extensions/active_record_spec.rb
typo-5.0 vendor/plugins/rspec_on_rails/spec/rails/extensions/active_record_spec.rb
typo-5.1.2 vendor/plugins/rspec_on_rails/spec/rails/extensions/active_record_spec.rb
typo-5.1.1 vendor/plugins/rspec_on_rails/spec/rails/extensions/active_record_spec.rb
typo-5.1.3 vendor/plugins/rspec_on_rails/spec/rails/extensions/active_record_spec.rb
typo-5.1 vendor/plugins/rspec_on_rails/spec/rails/extensions/active_record_spec.rb
typo-5.1.98 vendor/plugins/rspec-rails/spec/rails/extensions/active_record_spec.rb