poser 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/poser/presentable.rb +3 -1
- data/lib/poser/version.rb +1 -1
- data/spec/poser/presentable_spec.rb +5 -4
- metadata +1 -1
data/lib/poser/presentable.rb
CHANGED
data/lib/poser/version.rb
CHANGED
@@ -8,10 +8,7 @@ describe Poser::Presentable do
|
|
8
8
|
subject { C }
|
9
9
|
|
10
10
|
describe "presenter_class" do
|
11
|
-
|
12
|
-
Object.send :remove_const, :CPresenter
|
13
|
-
C.send :remove_const, :Presenter
|
14
|
-
end
|
11
|
+
before { subject.presenter_class = nil }
|
15
12
|
|
16
13
|
it "returns Poser::Presenter when no presenter classes are available for this class" do
|
17
14
|
subject.presenter_class.should == Poser::Presenter
|
@@ -20,11 +17,15 @@ describe Poser::Presentable do
|
|
20
17
|
it "returns CPresenter if it exists" do
|
21
18
|
CPresenter = Class.new
|
22
19
|
subject.presenter_class.should == CPresenter
|
20
|
+
Object.send :remove_const, :CPresenter
|
23
21
|
end
|
24
22
|
|
25
23
|
it "returns the Presenter class namespaced under this class if it exists" do
|
24
|
+
CPresenter = Class.new
|
26
25
|
C::Presenter = Class.new
|
27
26
|
subject.presenter_class.should == C::Presenter
|
27
|
+
C.send :remove_const, :Presenter
|
28
|
+
Object.send :remove_const, :CPresenter
|
28
29
|
end
|
29
30
|
end
|
30
31
|
end
|