Skip to content

Commit 1d6c6ec

Browse files
committed
test: Convert tests in nil_class_policy_spec.rb to one expect per test
1 parent 1063067 commit 1d6c6ec

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

spec/policies/nil_class_policy_spec.rb

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,31 @@
33
RSpec.describe NilClassPolicy do
44
subject { described_class.new(nil, nil) }
55

6-
it "doesn't permit any actions" do
6+
it "doesn't permit index action" do
77
expect(subject.index?).to be_falsey
8+
end
9+
10+
it "doesn't permit show action" do
811
expect(subject.show?).to be_falsey
12+
end
13+
14+
it "doesn't permit create action" do
915
expect(subject.create?).to be_falsey
16+
end
17+
18+
it "doesn't permit new action" do
1019
expect(subject.new?).to be_falsey
20+
end
21+
22+
it "doesn't permit update action" do
1123
expect(subject.update?).to be_falsey
24+
end
25+
26+
it "doesn't permit edit action" do
1227
expect(subject.edit?).to be_falsey
28+
end
29+
30+
it "doesn't permit destroy action" do
1331
expect(subject.destroy?).to be_falsey
1432
end
1533
end

0 commit comments

Comments
 (0)