Sha256: 343b67a1ad79caadf88f3454aa1afb119766819567d3b7bc2b91b96a74bcb86a

Contents?: true

Size: 560 Bytes

Versions: 5

Compression:

Stored size: 560 Bytes

Contents

require 'spec_helper'


describe DataMapper::Matchers::HaveProperty do
  context '#should' do
    it 'passes if property exists' do
      lambda {Book.should have_property :name}.should_pass
    end

    it 'fails if property does not exist' do
      lambda {Book.should have_property :bad_property}.should fail_with "expected to have property bad_property"
    end
  end

  context '#should_not' do
    it 'fails if property exists' do
      lambda {Book.should_not have_property :name}.should fail_with "expected to not have property name"
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
dm-rspec-0.1.2 spec/dm/matchers/have_property_spec.rb
dm-rspec-0.1.1 spec/dm/matchers/have_property_spec.rb
dm-rspec-0.1.0 spec/dm/matchers/have_property_spec.rb
dm-rspec-0.0.2 spec/dm/matchers/have_property_spec.rb
dm-rspec-0.0.1 spec/dm/matchers/have_property_spec.rb