Skip to content

Instantly share code, notes, and snippets.

@durexlw
Created February 18, 2016 09:41
Show Gist options
  • Save durexlw/fa2d67f609af19b2f544 to your computer and use it in GitHub Desktop.
Save durexlw/fa2d67f609af19b2f544 to your computer and use it in GitHub Desktop.
require 'test_helper'
class Wqm < ActiveSupport::TestCase
setup do
@wqm = Wqm.new
end
describe "when asking the first day of last month" do
it "should return the first day of last month" do
byebug
@wqm.first_day_of_previous_month(Date.parse("15/03/2015")).must_equal Date.parse("01/02/2015")
end
end
end
class Wqm
attr_reader :urls, :order_string
def initialize
buebug
@urls = { :WQM_LOGIN => {:url => 'https://secure...', :kind => 'login'},
:RP00119 => {:description => "...", :url => "https://secure...", :kind => "met_refertedatum"},
:RP00122 => {:description => "...", :url => "https://secure...", :kind => "met_refertedatum"},
:RP00154 => {:description => "...", :url => "https://secure...", :kind => "met_periode"}
}
@order_string = "&orderby.orderby.1.column=jaar" #order by year and month
@mechanize = Mechanize.new
end
Run options: --seed 39094
# Running:
EE..
Finished in 0.236440s, 16.9176 runs/s, 4.2294 assertions/s.
1) Error:
Wqm::login::when loggin in with valid credentials#test_0001_should login:
ArgumentError: wrong number of arguments (0 for 1)
test/unit/lib/wqm/wqm_test.rb:6:in `new'
test/unit/lib/wqm/wqm_test.rb:6:in `block in <class:Wqm>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment