This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==Make RubyMine to run rspec/cucumber with Spork DRb Server | |
I was testing RubyMine 6.3 and encountered a problem when running spec file with Spork DRb Server running at the background. The Rspec test failed with the following error message: | |
no such file to load -- teamcity/spec/runner/formatter/teamcity/formatter (LoadError) | |
RubyMine can run the spec without problem if there's no DRb running. | |
I spent a lot of time researching the topic to fix it and couldn't find an exact solution for the problem. However from the online resources I was able to come out with a way to fix the problem. Basically, you need to tell RubyMine to run spork with load path for the formatter. | |
In RubyMine you can set the Run options for Spork. For RubyMine 6.3, go to menu <b>Run</b>...<b>Edit Configurations</b>..., select <b>Defaults</b>...<b>Spork DRb</b>. Now on the <i>Environment variables</i> add this "<tt>RUBYMINE_HOME=/path/to/your-ruby-mine/</tt>"(ignore the double quote), and on the <i>Ruby arguments</i>, append this to th |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#life_steps.rb | |
require File.expand_path('lib/life.rb') | |
def get_pattern(pattern) | |
#ommitted, return the pattern | |
#check details on https://gist.github.com/proubits/dfa9964ed6f67a1db60c | |
end | |
def get_next_generation_pattern(pattern) | |
#ommitted, return the pattern |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cucumber::Rake::Task.new(:features) do |t| | |
t.cucumber_opts = "features --format pretty" | |
end | |
RSpec::Core::RakeTask.new(:spec) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#life.feature | |
Feature: life generation | |
In order to play game of life | |
As a player | |
I want to start the game and watch the life generation patterns | |
Scenario: generate block pattern | |
Given a "block" pattern as seed | |
When game generate next generation |