Skip to content

Instantly share code, notes, and snippets.

View alovak's full-sized avatar
🚀
Creating

Pavel Gabriel alovak

🚀
Creating
View GitHub Profile
# создаем одного пользователя (user - название фабрики)
Given a user exists
# создаем 20 пользователeй
Given 20 users exists
# создаем пользователя с id равным "2"
Given a user exists with an id of "2"
# создаем 20 пользователей со статусом "active"
Then a user should exist with activated: true, email: “[email protected]
@alovak
alovak / gist:717946
Created November 27, 2010 14:50
highlight
Feature:
As an administrator
In order to ...
I can ...
Scenario: enable user
Given a 5 users exist
When I follow "Users"
Then I should see "Something"
<form action="/payment" method="POST">
<!-- identification -->
<input name="order[user_id]" type="text" value="6" />
<!-- order -->
<input name="order[number]" type="input" value="777" />
<input name="order[email]" type="input" value="[email protected]" />
<input name="order[total_amount]" type="input" value="2500" />
<input name="order[currency]" type="input" value="USD" />
<form action="https://authorize.payments-sandbox.amazon.com/pba/paypipeline" method="POST">
<input type="image" src="https://authorize.payments-sandbox.amazon.com/pba/images/payNowButton.png" border="0">
<input type="hidden" name="accessKey" value="AKIAIWDZU3QUHNQF2TAQ" >
<input type="hidden" name="amount" value="USD 1.1" >
<input type="hidden" name="description" value="Test Widget" >
<input type="hidden" name="signatureMethod" value="HmacSHA256" >
<input type="hidden" name="referenceId" value="test-reference123" >
<input type="hidden" name="immediateReturn" value="0" >
<input type="hidden" name="returnUrl" value="http://yourwebsite.com/return.html" >
<input type="hidden" name="abandonUrl" value="http://yourwebsite.com/cancel.html" >
describe "Чайник" do
describe "Крышка" do
# ...
end
describe Вода do
# ...
end
end
describe "Чайник" do
describe "Крышка" do
# ...
end
describe "Вода" do
# ...
end
end
context "при температуре выше 100 С" do
#...
end
context "при температуре равной или выше 100 С" do
before do
kettle.water.stub(:temperature).and_return(100)
end
# ...
end
describe "Чайник" do
describe "Вода" do
context "при температуре равной или выше 100 С" do
before do
kettle.water.stub(:temperature).and_return(100)
end
it "должна кипеть" do
kettle.water.should be_boiling
end
end