public
Description: Spree is a complete open source commerce solution for Ruby on Rails.
Homepage: http://spreehq.org
Clone URL: git://github.com/schof/spree.git
Add more specs for Preferences and PreferenceDefinition classes
calas (author)
Thu Jul 03 11:27:25 -0700 2008
commit  ae770d6196345799b3d6f72541252f4dcf55d916
tree    271515372c886d5583ba5ff223547c48963dbadb
parent  45a00ad307ce537b151fc49ec8ff8b7365bbc912
...
22
23
24
 
...
22
23
24
25
0
@@ -22,3 +22,4 @@ spree_dev
0
 spree_test
0
 tmp
0
 vendor/rails
0
+coverage/*
...
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
 
 
 
 
 
 
 
 
 
 
 
52
53
54
55
56
57
58
59
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
34
35
36
 
 
 
 
 
 
 
 
 
 
 
37
 
 
 
38
39
40
41
42
43
44
45
46
47
48
49
50
 
 
 
 
 
 
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
0
@@ -34,26 +34,34 @@ describe Preference, "by default" do
0
   end
0
 end
0
 
0
-describe Preference, "in general" do
0
- it "should be valid with valid attributes"
0
- it "should require an attribute"
0
- it "should have an owner"
0
- it "should have an owner type"
0
- it "should not require a group"
0
- it "should not require a group even when a group type is specified"
0
- it "should not require a group type"
0
- it "should require a group type a group_id is specified"
0
-end
0
-
0
 describe Preference, "as a Class" do
0
- it "should be able to split nil groups"
0
- it "should be able to split non ActiveRecord groups"
0
- it "should be able to split ActiveRecord group"
0
+ it "should be able to split nil groups" do
0
+ group_id, group_type = Preference.split_group(nil)
0
+ group_id.should be_nil
0
+ group_type.should be_nil
0
+ end
0
+
0
+ it "should be able to split non ActiveRecord groups" do
0
+ group_id, group_type = Preference.split_group('car')
0
+ group_id.should be_nil
0
+ group_type.should == 'car'
0
+ end
0
 end
0
 
0
-describe Preference, "after being created" do
0
- it "should have an owner"
0
- it "should have a definition"
0
- it "should have a value"
0
- it "should not have a group association"
0
-end
0
+# describe Preference, "after being created" do
0
+# it "should have an owner"
0
+# it "should have a definition"
0
+# it "should have a value"
0
+# it "should not have a group association"
0
+# end
0
+
0
+# describe Preference, "in general" do
0
+# it "should be valid with valid attributes"
0
+# it "should require an attribute"
0
+# it "should have an owner"
0
+# it "should have an owner type"
0
+# it "should not require a group"
0
+# it "should not require a group even when a group type is specified"
0
+# it "should not require a group type"
0
+# it "should require a group type a group_id is specified"
0
+# end

Comments

    No one has commented yet.