This file contains hidden or 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 File.join(File.dirname(__FILE__), "spec_helper") | |
describe Merb::Router do | |
describe "#match" do | |
it "should raise an error if the routes were not compiled yet" do | |
lambda { Merb::Router.match(simple_request) }.should raise_error(Merb::Router::NotCompiledError) | |
end | |
This file contains hidden or 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 | |
require 'rubygems' | |
require 'dm-core' | |
class Zoo | |
include DataMapper::Resource | |
property :id, Serial | |
end |
This file contains hidden or 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 File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper_new')) | |
describe "I don't know what's going on" do | |
load_models_for_metaphor :zoo | |
before(:each) do | |
DataMapper.auto_migrate! | |
repository(:secondary) { DataMapper.auto_migrate! } | |
end |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>PostgreSQL</string> | |
<key>OnDemand</key> | |
<false/> | |
<key>ProgramArguments</key> | |
<array> |
This file contains hidden or 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
it "should create when dirty" do | |
pending | |
lambda do | |
Zoo.new(:city => "San Diego").save | |
end.should change(Zoo, :all).by(1) | |
end |
This file contains hidden or 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
it "should save child assosciations" do | |
repository(ADAPTER) do | |
animal = Animal.new | |
@zoo.animals << animal | |
@zoo.save | |
animal.new_record?.should be_false | |
end | |
end | |
This file contains hidden or 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
describe '#save' do | |
describe 'with a new resource' do | |
it "should save child assosciations" | |
it "should set defaults before create" | |
it "should create when the resource is dirty" do | |
zoo = Zoo.new | |
zoo.name = "San Diego" | |
zoo.should_receive(:create) |
NewerOlder