Sha256: d01dae21c77805455907843a58e1df8c14d01a2714e2fa84056a75f0261106b9
Contents?: true
Size: 843 Bytes
Versions: 6
Compression:
Stored size: 843 Bytes
Contents
Feature: the client can be used for peeking at responses hosted on Mirage. Background: Given the following gems are required to run the Mirage client test code: """ require 'rubygems' require 'rspec' require 'mirage/client' """ Scenario: peeking a response Given a template for 'greeting' has been set with a value of 'Hello' When I run """ Mirage::Client.new.templates(1).body.should == 'Hello' """ When GET is sent to '/requests/1' Then a 404 should be returned Scenario: getting a response that does not exist Given I run """ begin Mirage::Client.new.templates(2).should == 'this should not have happened' fail("Error should have been thrown") rescue Exception => e puts e e.is_a?(Mirage::ResponseNotFound).should == true end """
Version data entries
6 entries across 6 versions & 1 rubygems