Skip to content

Commit

Permalink
initial specs
Browse files Browse the repository at this point in the history
  • Loading branch information
mparker committed Nov 11, 2009
0 parents commit c17ff38
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/flakey.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require 'flakey/flakey'
4 changes: 4 additions & 0 deletions lib/flakey/flakey.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ActiveResource::Base.instance_eval do
def flakey
end
end
23 changes: 23 additions & 0 deletions spec/lib_specs/flakey_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe "an ActiveResource::Base derived class" do
before do
class Book < ActiveResource::Base
end
end

describe "flakey class method" do
it "should not throw an error when you call flakey" do
proc {
Book.flakey
}.should_not raise_error
end

it "should not thrown an error when you pass a block to flakey" do
proc {
Book.flakey do |fortify|
end
}.should_not raise_error
end
end
end
3 changes: 3 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$LOAD_PATH << './lib'
require 'activeresource'
require 'flakey'

0 comments on commit c17ff38

Please sign in to comment.