Skip to content

Instantly share code, notes, and snippets.

@dchelimsky
Created January 7, 2009 02:01
Show Gist options
  • Save dchelimsky/44142 to your computer and use it in GitHub Desktop.
Save dchelimsky/44142 to your computer and use it in GitHub Desktop.
before :each do
@mock_browser = mock("@browser")
@mock_browser.stub!(:type)
@mock_browser.stub!(:select)
@builder = Company::Selenium::Builders::BillingAddress.new(@mock_browser)
@builder.stub!(:browser).and_return(@mock_browser)
end
it "sends instruction for BillName" do
@mock_browser.should_receive(:send).with(:type, "BillName", "Bob Dole").once
@builder.with_name_on_account "Bob Dole"
@builder.populate
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment