File tree 2 files changed +7
-9
lines changed
2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 8
8
end
9
9
10
10
it "defined a local variable called greeting and set it equal to 'Hello World'" do
11
- match = false
12
- right_answers . each do |a |
13
- if @content . match ( a )
14
- match = true
15
- break
16
- end
17
- end
18
- expect ( match ) . to eq ( true )
11
+ expect ( right_answers . any? { |answer | @content . match ( answer ) } ) . to eq ( true )
19
12
end
20
13
21
- it "should not be a global or instance variable" do
14
+ it "should not be an instance variable" do
22
15
expect ( @content ) . to_not include ( "@" )
23
16
end
24
17
18
+ it "should not be an global variable" do
19
+ expect ( @content ) . to_not include ( "$" )
20
+ end
25
21
end
Original file line number Diff line number Diff line change 1
1
# Define a local variable called 'greeting',
2
2
# give it the value of the string "Hello World"
3
+
4
+ greeting = 'Hello World'
You can’t perform that action at this time.
0 commit comments