File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change 28
28
expect ( attributes . keys ) . to all ( be_kind_of ( Symbol ) )
29
29
end
30
30
31
- it "must have a valid :url" do
32
- expect ( attributes [ :url ] ) . to match ( /\A #{ URI ::DEFAULT_PARSER . make_regexp ( %w[ http https ] ) } \z / )
31
+ describe ":url" do
32
+ it "must be a http:// or https:// URL" do
33
+ expect ( attributes [ :url ] ) . to match ( /\A #{ URI ::DEFAULT_PARSER . make_regexp ( %w[ http https ] ) } \z / )
34
+ end
33
35
end
34
36
35
37
it "must have :categories" do
38
40
expect ( attributes [ :categories ] ) . to all ( be_kind_of ( String ) )
39
41
end
40
42
41
- it "all :categories must be lowercase words" do
42
- expect ( attributes [ :categories ] ) . to all ( match ( /\A [a-z][a-z0-9_-]+\z / ) )
43
+ describe ":categories" do
44
+ it "must contain lowercase words" do
45
+ expect ( attributes [ :categories ] ) . to all ( match ( /\A [a-z][a-z0-9_-]+\z / ) )
46
+ end
43
47
end
44
48
45
49
it "must have a :summary" do
46
50
expect ( attributes [ :summary ] ) . to be_kind_of ( String )
47
51
expect ( attributes [ :summary ] ) . to_not be_empty
48
- expect ( attributes [ :summary ] ) . to end_with ( '.' )
52
+ end
53
+
54
+ describe ":summary" do
55
+ it "must end with a period" do
56
+ expect ( attributes [ :summary ] ) . to end_with ( '.' )
57
+ end
49
58
end
50
59
end
51
60
end
You can’t perform that action at this time.
0 commit comments