diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..debc11c --- /dev/null +++ b/Rakefile @@ -0,0 +1,8 @@ +require 'rake/testtask' + +Rake::TestTask.new do |t| + t.libs << 'test' +end + +desc "Run tests" +task :default => :test diff --git a/lib/wayback_machine_downloader.rb b/lib/wayback_machine_downloader.rb index ab9e612..e11018b 100644 --- a/lib/wayback_machine_downloader.rb +++ b/lib/wayback_machine_downloader.rb @@ -1,5 +1,5 @@ class WaybackMachineDownloader def self.hi name - puts "Hello world! #{name}" + "Hello world! #{name}" end end diff --git a/test/test_wayback_machinve_downloader.rb b/test/test_wayback_machinve_downloader.rb new file mode 100644 index 0000000..f68f067 --- /dev/null +++ b/test/test_wayback_machinve_downloader.rb @@ -0,0 +1,8 @@ +require 'minitest/autorun' +require 'wayback_machine_downloader' + +class WaybackMachineDownloaderTest < Minitest::Test + def test_english_hello + assert_equal "Hello world! John", WaybackMachineDownloader.hi("John") + end +end