Skip to content

Instantly share code, notes, and snippets.

View edipofederle's full-sized avatar
🏠
Working from home

Édipo Féderle edipofederle

🏠
Working from home
View GitHub Profile
public class Element {
private Integer value;
private Element ant;
public Element(Integer value){
this.value = value;
}
require 'rubygems'
require 'httparty'
class Github
include HTTParty
base_uri "http://github.com/api/v2/yaml"
API_METHODS = {
:repos => '/repos/show/',
:fork => '/repos/fork/'
before(:each) do
FakeFS.activate!
end
after(:each) do
FakeFS.deactivate!
end
require 'fakefs'
describe "Controller" do
FakeFS.activate!
end
desc "Run all examples with RCov"
Spec::Rake::SpecTask.new('examples_with_rcov') do |t|
t.spec_files = FileList['spec/*.rb']
t.rcov = true
t.rcov_opts = ['--exclude', 'spec']
end
config:
url: exemplo.com
user: edipofederle
password: secreta
app_name: blog_demo
origin: origin
#!/bin/sh
cd ~/rails_app/app_name
env -i git reset --hard
env -i git pull origin master
env -i rake db:migrate RAILS_ENV=production
env -i touch ~/rails_app/app_name/tmp/restart.txt
@javascript
Scenario: Remove Produto
Given I have a product called "Cadeira"
When I go to the products page
And I follow "Remove"
Then I should see "Product was successfylly removed"
@javascript
Scenario: Remove Produto
Given I have a product called "Cadeira"
When I go to the products page
And I confirm dialog on the next step
And I follow "Remove"
Then I should see "Product was successfylly removed"
Then /^I confirm dialog on the next stpe$/ do
page.evaluate_script("window.alert = function(msg) {return true; }")
page.evaluate_script("window.confirm = function(msg) {return true; }")
end