Skip to content

Instantly share code, notes, and snippets.

<%
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
rerun_opts = rerun.to_s.strip.empty? ? "--format progress features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
std_opts = "#{rerun_opts} --format rerun --out rerun.txt --strict --tags ~@wip"
%>
default: <%= std_opts %>
wip: --tags @wip:3 --wip features
Autotest.add_hook :initialize do |at|
%w{rerun.txt}.each do |exception|
at.add_exception(exception)
end
end
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/opt/local/bin:/opt/local/sbin:$PATH"
export PS1='\[\033[0;35m\]\h\[\033[0;33m\] \w\[\033[00m\]: '
export EDITOR='mate -w'
export AUTOFEATURE=false
export RSPEC=true
export CUCUMBER_COLORS=passed=white
export CUCUMBER_COLORS=passed=white,bold:passed_param=white,bold,underline
export CUCUMBER_COLORS=pending_param=magenta:failed_param=magenta:passed_param=magenta:skipped_param=magenta
can you make it
def rest_actions
@rest_actions = DreamResourceGenerator.rest_actions unless @rest_actions.empty?
@rest_actions
end
That also means the:
gem install dream_gens
git submodule add git://github.com/dreamr/dream_gens.git vender/plugins/dream_gens
require 'rubygems'
require 'spork'
Spork.prefork do
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path(File.join(File.dirname(__FILE__),'..','config','environment'))
require 'spec/autorun'
require 'spec/rails'
require 'remarkable_rails'
require 'faker'
~/development/oss/dream_gens (alex.heaton): autospec
loading autotest/cucumber_rspec
Warning: $KCODE is NONE.
/Library/Ruby/Gems/1.8/gems/treetop-1.4.3/lib/treetop/ruby_extensions/string.rb:31: warning: method redefined; discarding old indent
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby /Library/Ruby/Gems/1.8/gems/rspec-1.3.0/bin/spec --autospec /Users/dreamr/development/oss/dream_gens/spec/dream_feature_generator_spec.rb /Users/dreamr/development/oss/dream_gens/spec/dream_resource_generator_spec.rb -O spec/spec.opts
..........
Finished in 0.226597 seconds
10 examples, 0 failures
Feature: Dream Resource Generation
In order to develop outside-in quickly
As a rails developer
I want to generate a restful resource and specs quickly
Scenario: Developer calls dream_resource with: user email:string
Given I have a new rails app
When I run the dream_resource generator with: user, args: "email:string"
Then the "user" controller should contain actions:
|action |
iterate app/models/*.rb
read file and pull in these
has_many :items
has_many :folders
has_many :blocks
has_many :picoticker_blocks
has_one :login_cookie