forked from exercism/ruby-test-runner
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
97 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
ruby-3.2.2 | ||
ruby-3.3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"version":3,"status":"pass","message":null,"tests":[]} | ||
{"version":3,"status":"fail","message":null,"tests":[{"name":"No name given","test_code":"assert_equal \"One for you, one for me.\", TwoFer.two_fer","status":"fail","output":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n\n...Output was truncated. Please limit to 500 chars...","message":"Expected: \"One for you, one for me.\"\n Actual: false"}]} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"version":2,"status":"pass","message":null,"tests":[{"name":"No name given","test_code":"assert_equal \"One for you, one for me.\", TwoFer.two_fer","status":"pass"},{"name":"A name given","test_code":"assert_equal \"One for Alice, one for me.\", TwoFer.two_fer(\"Alice\")","status":"pass"},{"name":"Another name given","test_code":"assert_equal \"One for Bob, one for me.\", TwoFer.two_fer(\"Bob\")","status":"pass"}]} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
require 'minitest/autorun' | ||
require 'minitest/benchmark' | ||
require_relative 'two_fer' | ||
|
||
class TwoFerBenchmarkTest < Minitest::Benchmark | ||
def bench_two_fer | ||
assert_performance_linear 0.9999 do |n| # n is a range value | ||
TwoFer.two_fer | ||
end | ||
end | ||
end |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"version":3,"status":"pass","message":null,"tests":[]} | ||
{"version":3,"status":"fail","message":null,"tests":[{"name":"No name given","test_code":"assert_equal \"One for you, one for me.\", TwoFer.two_fer","status":"error","message":"NoMethodError: undefined method `non_existant_method' for nil\n\nTraceback (most recent call first):\n Line 8:in `work_out_name'\n Line 3:in `two_fer'"}]} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"version":3,"status":"pass","message":null,"tests":[]} | ||
{"version":3,"status":"error","message":"Line 3: undefined local variable or method `raise_an_error_because_i_am_a_random_method' for main (NameError)","tests":null} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"version":3,"status":"pass","message":null,"tests":[]} | ||
{"version":3,"status":"fail","message":null,"tests":[{"name":"No name given","test_code":"assert_equal \"One for you, one for me.\", TwoFer.two_fer","status":"fail","output":"The name is fred.\nHere's another line.\n","message":"Expected: \"One for you, one for me.\"\n Actual: \"One for fred, one for me.\""},{"name":"A name given","test_code":"assert_equal \"One for Alice, one for me.\", TwoFer.two_fer(\"Alice\")","status":"pass","output":"The name is Alice.\nHere's another line.\n"},{"name":"Another name given","test_code":"assert_equal \"One for Bob, one for me.\", TwoFer.two_fer(\"Bob\")","status":"pass","output":"The name is Bob.\nHere's another line.\n"}]} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"version":3,"status":"pass","message":null,"tests":[]} | ||
{"version":3,"status":"fail","message":null,"tests":[{"name":"Assert equal works properly","test_code":"some_result = TwoFer.two_fer\nassert_equal \"One for you, one for me.\", some_result","status":"error","message":"NameError: uninitialized constant SomeTest::TwoFer\n\nTraceback (most recent call first):\n Line 3:in `test_assert_equal_works_properly'"},{"name":"Skip works properly","test_code":"something = \"Something\"\nassert something.present?","status":"error","message":"NoMethodError: undefined method `present?' for an instance of String\n\nTraceback (most recent call first):\n Line 5:in `test_skip_works_properly'"},{"name":"Zebra","test_code":"some_result = TwoFer.two_fer(\"zebra\")\nassert_equal \"One for you, one for zebra.\", some_result","status":"error","message":"NameError: uninitialized constant SomeTest::TwoFer\n\nTraceback (most recent call first):\n Line 3:in `test_zebra'"},{"name":"Anaconda","test_code":"some_result = TwoFer.two_fer(\"anaconda\")\nassert_equal \"One for you, one for anaconda.\", some_result","status":"error","message":"NameError: uninitialized constant SomeTest::TwoFer\n\nTraceback (most recent call first):\n Line 8:in `test_anaconda'"},{"name":"Gorilla","test_code":"some_result = TwoFer.two_fer(\"gorilla\")\nassert_equal \"One for you, one for gorilla.\", some_result","status":"error","message":"NameError: uninitialized constant SomeTest::TwoFer\n\nTraceback (most recent call first):\n Line 13:in `test_gorilla'"},{"name":"Boa","test_code":"some_result = TwoFer.two_fer(\"boa\")\nassert_equal \"One for you, one for boa.\", some_result","status":"error","message":"NameError: uninitialized constant SomeTest::TwoFer\n\nTraceback (most recent call first):\n Line 18:in `test_boa'"}]} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"version":3,"status":"pass","message":null,"tests":[]} | ||
{"version":3,"status":"pass","message":null,"tests":[{"name":"No name given","test_code":"assert_equal \"One for you, one for me.\", TwoFer.two_fer","status":"pass"},{"name":"A name given","test_code":"assert_equal \"One for Alice, one for me.\", TwoFer.two_fer(\"Alice\")","status":"pass"},{"name":"Another name given","test_code":"assert_equal \"One for Bob, one for me.\", TwoFer.two_fer(\"Bob\")","status":"pass"}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class TwoFer | ||
def self.two_fer(name = "you") | ||
"One for #{name}, one for me." | ||
end | ||
end |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"version":3,"status":"pass","message":null,"tests":[]} | ||
{"version":3,"status":"pass","message":null,"tests":[{"name":"Rightward assign","test_code":"assert_equal Ruby3Syntax.rightward_assign, 'is fun'","status":"pass"},{"name":"Endless method def","test_code":"assert_equal Ruby3Syntax.endless_methods, 'are fun'","status":"pass"}]} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"version":3,"status":"pass","message":null,"tests":[]} | ||
{"version":3,"status":"error","message":"Line 2: syntax error, unexpected ',', expecting end-of-input\nend,A stray comma\n ^\n","tests":null} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
require 'minitest/autorun' | ||
require_relative 'two_fer' | ||
|
||
# Common test data version: 1.2.0 4fc1acb | ||
class TwoFerTest < Minitest::Test | ||
def test_no_name_given | ||
# skip | ||
assert_equal "One for you, one for me.", TwoFer.two_fer | ||
end | ||
|
||
def test_a_name_given | ||
skip | ||
assert_equal "One for Alice, one for me.", TwoFer.two_fer("Alice") | ||
end | ||
|
||
def test_another_name_given | ||
skip | ||
assert_equal "One for Bob, one for me.", TwoFer.two_fer("Bob") | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"version":3,"status":"pass","message":null,"tests":[]} | ||
{"version":3,"status":"error","message":"Line 3: syntax error, unexpected ','\n,'This is meant to be a syntax...\n^\n","tests":null} |
File renamed without changes.