diff --git a/tests/libs.rb b/tests/libs.rb index 4357cb07..907ef709 100644 --- a/tests/libs.rb +++ b/tests/libs.rb @@ -1,8 +1,8 @@ -@@agent = Mechanize.new +$agent = Mechanize.new def request(path, data = {}) uri = 'http://localhost:8080' + path - response = @@agent.post(uri, data) + response = $agent.post(uri, data) return JSON.parse(response.body) end diff --git a/tests/ticket/comment.rb b/tests/ticket/comment.rb index fe0cb07c..76454bc4 100644 --- a/tests/ticket/comment.rb +++ b/tests/ticket/comment.rb @@ -1,4 +1,4 @@ -describe 'ticket/comment/' do +describe '/ticket/comment/' do it 'should fail if invalid token is passed' do result = request('/ticket/comment', { content: 'some comment content',