spec/support/macros/content_helpers.rb in daigaku-0.3.0 vs spec/support/macros/content_helpers.rb in daigaku-0.4.0
- old
+ new
@@ -1,15 +1,15 @@
module ContentHelpers
-
TASK_FILE_CONTENT = [
- "Heading\n======", "##Task",
- "Solve this task!",
- "##Hints",
- "Just do it right..."
- ].join("\n\n")
+ "Heading\n======",
+ '##Task',
+ 'Solve this task!',
+ '##Hints',
+ 'Just do it right...'
+ ].join("\n\n").freeze
- SOLUTION_CONTENT = 'print "hello world".upcase'
+ SOLUTION_CONTENT = 'print "hello world".upcase'.freeze
TEST_CONTENT = [
"require 'rspec'\n",
"describe 'Your code' do",
" it 'prints out HELLO WORLD' do",
@@ -18,16 +18,16 @@
" it 'uses the method #upcase to get capital letters' do",
" allow(self).to receive(:puts).and_return ''",
" allow(self).to receive(:print).and_return ''",
" expect_any_instance_of(String).to receive(:upcase).and_return('HELLO WORLD')\n",
" [['solution::code']]",
- " end",
- "end"
- ].join("\n")
+ ' end',
+ 'end'
+ ].join("\n").freeze
TEST_FAILED_JSON =
- %Q#
+ '
{ "examples":
[
{ "description": "description 1",
"full_description": "full description 1",
"status": "failed",
@@ -54,14 +54,14 @@
"failure_count": 1,
"pending_count": 0
},
"summary_line": "2 example, 1 failure"
}
- #
+ '.freeze
TEST_PASSED_JSON =
- %Q#
+ '
{ "examples":
[
{ "description":"description 1",
"full_description":"full description 1",
"status":"passed",
@@ -83,14 +83,14 @@
"failure_count":0,
"pending_count":0
},
"summary_line":"2 example, 0 failures"
}
- #
+ '.freeze
- TEST_PASSED_MESSAGE = "Your code passed all tests."
- EXAMPLE_PASSED_MESSAGE = "Your code passed this requirement."
+ TEST_PASSED_MESSAGE = 'Your code passed all tests.'.freeze
+ EXAMPLE_PASSED_MESSAGE = 'Your code passed this requirement.'.freeze
def task_file_content
TASK_FILE_CONTENT
end
@@ -123,7 +123,6 @@
end
def example_passed_message
EXAMPLE_PASSED_MESSAGE
end
-
end