diff --git a/lib/webrat/rack/rack_session.rb b/lib/webrat/rack/rack_session.rb new file mode 100644 index 0000000..b283294 --- /dev/null +++ b/lib/webrat/rack/rack_session.rb @@ -0,0 +1,13 @@ +require 'webrat' + +module Webrat + class RackSession < Session + def response_body + @response.body + end + + def response_code + @response.status + end + end +end \ No newline at end of file diff --git a/lib/webrat/sinatra/sinatra_session.rb b/lib/webrat/sinatra/sinatra_session.rb new file mode 100644 index 0000000..597c3b8 --- /dev/null +++ b/lib/webrat/sinatra/sinatra_session.rb @@ -0,0 +1,13 @@ +require 'webrat/rack/rack_session' +require 'sinatra' +require 'sinatra/test/methods' + +module Webrat + class SinatraSession < RackSession + include Sinatra::Test::Methods + + def get(*args) + get_it(*args) + end + end +end \ No newline at end of file