poser 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +7 -0
- data/README.md +2 -0
- data/lib/poser/presenter.rb +4 -0
- data/lib/poser/version.rb +1 -1
- data/spec/poser/presenter_spec.rb +16 -0
- metadata +3 -2
data/.travis.yml
ADDED
data/README.md
CHANGED
data/lib/poser/presenter.rb
CHANGED
data/lib/poser/version.rb
CHANGED
@@ -10,6 +10,14 @@ describe Poser::Presenter do
|
|
10
10
|
@context = Object.new
|
11
11
|
end
|
12
12
|
|
13
|
+
it "returns the object if it's not truthy" do
|
14
|
+
@object = nil
|
15
|
+
subject.present(@object, @context).should === @object
|
16
|
+
|
17
|
+
@object = false
|
18
|
+
subject.present(@object, @context).should === @object
|
19
|
+
end
|
20
|
+
|
13
21
|
it "returns the object if it's presented" do
|
14
22
|
@object.stub(:presented?) { true }
|
15
23
|
subject.present(@object, @context).should == @object
|
@@ -68,5 +76,13 @@ describe Poser::Presenter do
|
|
68
76
|
subject.present(object).should == result
|
69
77
|
end
|
70
78
|
end
|
79
|
+
|
80
|
+
describe "is_a?" do
|
81
|
+
it "is true with it's class or it's presentee's class" do
|
82
|
+
@presentee = ""
|
83
|
+
subject.is_a?(String).should be_true
|
84
|
+
subject.is_a?(Poser::Presenter).should be_true
|
85
|
+
end
|
86
|
+
end
|
71
87
|
end
|
72
88
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: poser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-04-
|
12
|
+
date: 2012-04-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -35,6 +35,7 @@ extensions: []
|
|
35
35
|
extra_rdoc_files: []
|
36
36
|
files:
|
37
37
|
- .gitignore
|
38
|
+
- .travis.yml
|
38
39
|
- Gemfile
|
39
40
|
- LICENSE
|
40
41
|
- README.md
|