Sha256: b6818eae57bf1cc4d3369629c228e85ae44f8c289ece346417e690da4f7f87d5

Contents?: true

Size: 455 Bytes

Versions: 1

Compression:

Stored size: 455 Bytes

Contents

require 'spec_helper'

describe ElabsMatchers::Matchers::Rspec::Orm do
  let(:post) { ElabsMatchers::Orm::Post.create(:title => "New", :body => "Lorem") }

  describe "#persist" do
    it "returns true if the value is the supplied" do
      post.should persist(:title, "Updated")
    end

    it "returns false if the value isn't the supplied" do
      post.stub(:title).and_return("New")
      post.should_not persist(:title, "Updated")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
elabs_matchers-0.0.3 spec/elabs_matchers/matchers/rspec/orm_spec.rb