This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# A one file test to show count | |
require 'rubygems' | |
require 'dm-core' | |
require 'dm-aggregates' | |
# setup the logger | |
DataMapper::Logger.new(STDOUT, :debug) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "dm-core" | |
require 'dm-migrations' | |
require "test/unit" | |
DataMapper.setup(:default, 'sqlite3::memory:') | |
class Person | |
include DataMapper::Resource | |
property :id, Serial | |
property :name, String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Spec::Runner.configure do |config| | |
config.before do | |
repository do |r| | |
transaction = DataMapper::Transaction.new(r) | |
transaction.begin | |
r.adapter.push_transaction(transaction) | |
end | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# line 16 | |
it "should tell you when it receives the right message with the wrong args if you stub the method (fix bug 15719)" do | |
# NOTE - for whatever reason, if you use a the block style of pending here, | |
# rcov gets unhappy. Don't know why yet. | |
m = mock("foo") | |
m.stub!(:bar) | |
m.should_receive(:bar).with("message") | |
lambda { | |
m.bar("different message") | |
}.should raise_error(Rspec::Mocks::MockExpectationError, %Q{Mock 'foo' expected :bar with ("message") but received it with ("different message")}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 8e634002d6d79e2c5e2b599e69edd867628364d3 Mon Sep 17 00:00:00 2001 | |
From: Kabari Hendrick <[email protected]> | |
Date: Mon, 13 Dec 2010 23:10:33 -0600 | |
Subject: [PATCH] fixing lazy load | |
Signed-off-by: Kabari Hendrick <[email protected]> | |
--- | |
lib/dm-core/model/property.rb | 2 +- | |
spec/public/property_spec.rb | 14 +++++++++++++- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From dac3c04bba2898757e0ea7004b49ec7f63894d50 Mon Sep 17 00:00:00 2001 | |
From: Kabari Hendrick <[email protected]> | |
Date: Tue, 14 Dec 2010 00:26:54 -0600 | |
Subject: [PATCH] allow subclassesd models to have different storage | |
Signed-off-by: Kabari Hendrick <[email protected]> | |
--- | |
lib/dm-migrations/auto_migration.rb | 6 +- | |
spec/integration/model_migration_spec.rb | 64 ++++++++++++++++++++++++++++++ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From feeb8da75a0f6b2dd6d07c53fa4235fef21f050f Mon Sep 17 00:00:00 2001 | |
From: Kabari Hendrick <[email protected]> | |
Date: Sat, 18 Dec 2010 10:41:19 -0600 | |
Subject: [PATCH] fixing bug 1372: save method not catching validations on accessors | |
Signed-off-by: Kabari Hendrick <[email protected]> | |
--- | |
lib/dm-core/resource.rb | 5 ++--- | |
lib/dm-core/spec/shared/resource_spec.rb | 5 +++-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 95c7e993f0c124f6fda4fce45452d63ede469fd3 Mon Sep 17 00:00:00 2001 | |
From: Kabari Hendrick <[email protected]> | |
Date: Wed, 22 Dec 2010 13:01:51 -0600 | |
Subject: [PATCH] git rid of strict dependency | |
Signed-off-by: Kabari Hendrick <[email protected]> | |
--- | |
Rakefile | 2 +- | |
1 files changed, 1 insertions(+), 1 deletions(-) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
require 'dm-core' | |
def create_dm_model(name) | |
DataMapper::Model.new(name) do | |
property :id, DataMapper::Property::Serial | |
property :name, DataMapper::Property::String | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.before(:each) do | |
repository(:default) do | |
transaction = DataMapper::Transaction.new(repository) | |
transaction.begin | |
repository.adapter.push_transaction(transaction) | |
end | |
end | |
config.after(:each) do | |
repository(:default).adapter.pop_transaction.rollback |
OlderNewer