Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

moved test exhibits into own files

  • Loading branch information...
commit 4b66ed76a80a15867c8311b51f22d595dce6a9b7 1 parent b9a9c42
@Najaf authored
View
1  Rakefile
@@ -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
View
16 spec/exhibitionist/base_spec.rb
@@ -1,18 +1,8 @@
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
@@ -20,9 +10,7 @@ def say(string)
end
let(:bare) { Speaker.new }
-
let(:exhibit) { ShoutExhibit.new(bare) }
-
let(:double_exhibit) { StutterExhibit.new(exhibit) }
it 'decorates methods' do
View
3  spec/spec_helper.rb
@@ -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'
View
5 spec/support/test_exhibits/shout_exhibit.rb
@@ -0,0 +1,5 @@
+class ShoutExhibit < Exhibitionist::Base
+ def say(string)
+ __getobj__.say(string).upcase
+ end
+end
View
5 spec/support/test_exhibits/stutter_exhibit.rb
@@ -0,0 +1,5 @@
+class StutterExhibit < Exhibitionist::Base
+ def say(string)
+ "Ummm... #{__getobj__.say(string)}"
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.