Permalink
Browse files

moved test exhibits into own files

  • Loading branch information...
1 parent b9a9c42 commit 4b66ed76a80a15867c8311b51f22d595dce6a9b7 @Najaf committed Apr 7, 2012
View
@@ -6,6 +6,7 @@ require 'rake/testtask'
Rake::TestTask.new do |t|
t.pattern = "spec/**/*_spec.rb"
t.libs.push 'spec'
+ t.libs.push 'spec/support'
end
task :spec => :test
@@ -1,28 +1,16 @@
require 'spec_helper'
+require 'test_exhibits/shout_exhibit'
+require 'test_exhibits/stutter_exhibit'
describe Exhibitionist::Base do
- class ShoutExhibit < Exhibitionist::Base
- def say(string)
- __getobj__.say(string).upcase
- end
- end
-
- class StutterExhibit < Exhibitionist::Base
- def say(string)
- "Ummm... #{__getobj__.say(string)}"
- end
- end
-
class Speaker
def say(string)
string
end
end
let(:bare) { Speaker.new }
-
let(:exhibit) { ShoutExhibit.new(bare) }
-
let(:double_exhibit) { StutterExhibit.new(exhibit) }
it 'decorates methods' do
View
@@ -1,5 +1,3 @@
-require 'exhibitionist'
-
require 'minitest/spec'
require 'minitest/autorun'
require 'minitest/pride'
@@ -8,3 +6,4 @@
MiniTest::Unit.runner = MiniTest::SuiteRunner.new
MiniTest::Unit.runner.reporters << MiniTest::Reporters::SpecReporter.new
+require 'exhibitionist'
@@ -0,0 +1,5 @@
+class ShoutExhibit < Exhibitionist::Base
+ def say(string)
+ __getobj__.say(string).upcase
+ end
+end
@@ -0,0 +1,5 @@
+class StutterExhibit < Exhibitionist::Base
+ def say(string)
+ "Ummm... #{__getobj__.say(string)}"
+ end
+end

0 comments on commit 4b66ed7

Please sign in to comment.