rspreedly 0.1.9 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/rspreedly/base.rb +1 -1
- data/rspreedly.gemspec +1 -1
- data/spec/base_spec.rb +20 -1
- metadata +1 -1
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.10
|
data/lib/rspreedly/base.rb
CHANGED
data/rspreedly.gemspec
CHANGED
data/spec/base_spec.rb
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
|
2
2
|
|
|
3
|
-
class TestAPI < RSpreedly::Base
|
|
3
|
+
class TestAPI < RSpreedly::Base
|
|
4
|
+
attr_accessor :something
|
|
5
|
+
end
|
|
4
6
|
|
|
5
7
|
describe RSpreedly::Base do
|
|
6
8
|
|
|
@@ -13,6 +15,23 @@ describe RSpreedly::Base do
|
|
|
13
15
|
end
|
|
14
16
|
end
|
|
15
17
|
|
|
18
|
+
describe "attributes=" do
|
|
19
|
+
before(:each) do
|
|
20
|
+
@api = TestAPI.new
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
it "should assign attributes if they exist" do
|
|
24
|
+
@api.attributes = {:something => "test"}
|
|
25
|
+
@api.something.should == "test"
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
it "should not fail if an attribute does not exist" do
|
|
29
|
+
lambda{
|
|
30
|
+
@api.attributes = {:foo => true}
|
|
31
|
+
}.should_not raise_error
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
16
35
|
describe "error messages" do
|
|
17
36
|
|
|
18
37
|
before(:each) do
|