lib/spreedly/test_hacks.rb in spreedly-1.3.1 vs lib/spreedly/test_hacks.rb in spreedly-1.3.2

- old
+ new

@@ -3,11 +3,11 @@ module Spreedly class Subscriber # This method is *strictly* for use when testing, and will # probably only work against a test Spreedly site anyhow. def subscribe(plan_id) - agent = WWW::Mechanize.new + agent = Mechanize.new page = agent.get(Spreedly.subscribe_url(id, plan_id)) page = page.forms.first.submit form = page.forms.first form['credit_card[first_name]'] = 'Joe' form['credit_card[last_name]'] = 'Bob' @@ -19,6 +19,6 @@ form['credit_card[year]'] = '2024' page = form.click_button raise "Subscription didn't got through" unless page.title == "Thank you!" end end -end \ No newline at end of file +end