test/exercism/api_test.rb in exercism-0.0.5 vs test/exercism/api_test.rb in exercism-0.0.6
- old
+ new
@@ -34,11 +34,11 @@
readme_path = File.join(assignment_dir, 'README.md')
tests_path = File.join(assignment_dir, 'test.rb')
Exercism.stub(:home, home) do
VCR.use_cassette('alice-gets-bob') do
- Exercism::Api.fetch_for(Exercism.user, project_dir)
+ Exercism::Api.new('http://localhost:4567', Exercism.user, project_dir).fetch
Approvals.verify(File.read(readme_path), name: 'alice_gets_bob_readme')
Approvals.verify(File.read(tests_path), name: 'alice_gets_bob_tests')
end
end
@@ -52,10 +52,10 @@
f.write "puts 'hello world'"
end
Exercism.stub(:home, home) do
VCR.use_cassette('alice-submits-bob') do
- response = Exercism::Api.submit(submission, {for: Exercism.user})
+ response = Exercism::Api.new('http://localhost:4567', Exercism.user).submit(submission)
assert_equal 201, response.status
end
end
end