test.rb in mirage-3.0.0.alpha.3 vs test.rb in mirage-3.0.0.alpha.4

- old
+ new

@@ -1,27 +1,18 @@ require './lib/mirage/client' +class ServiceNowResponse + extend Mirage::Template::Model -mirage = Mirage.start + endpoint 'service_now' -#mirage.clear -#mirage.put('some/path/greeting', 'hello') do |response| -# response.http_method = :post -#end -# -#template = mirage.put('some/path/greeting', 'hello Michele') do |response| -# response.http_method = :post -# response.required_parameters['name']='Michele' -# response.required_body_content << 'stara' -# response.required_headers['Custom-Header']='special' -#end -# + builder_methods :this,:that + def value + "my value : #{this}, #{that}" + end +end - - - - - - - - +Mirage.stop +mirage = Mirage.start +mirage.put ServiceNowResponse.new.this('foo').that('bar') +mirage.put ServiceNowResponse.new.this('foo').that('bar').required_body_content(%w(hello world))