cucumber-attic / cucumber-tmbundle Goto Github PK
View Code? Open in Web Editor NEWThis project forked from bmabey/cucumber-tmbundle
TextMate bundle for Cucumber
Home Page: http://www.benmabey.com
License: MIT License
This project forked from bmabey/cucumber-tmbundle
TextMate bundle for Cucumber
Home Page: http://www.benmabey.com
License: MIT License
Running: /Users/eumir/.rvm/rubies/ruby-1.9.2-p180/bin/ruby /Users/eumir/rails_apps/kiseki/script/cucumber /Users/eumir/rails_apps/kiseki/features/users/generate_character.feature --format=html
Using the default profile...
Disabling profiles...
Exception encountered: # backtrace:
/Users/eumir/.rvm/gems/ruby-1.9.2-p180@kiseki/gems/cucumber-1.0.0/lib/cucumber/cli/configuration.rb:194:in `arrange_formats'
/Users/eumir/.rvm/gems/ruby-1.9.2-p180@kiseki/gems/cucumber-1.0.0/lib/cucumber/cli/configuration.rb:26:in `parse!'
/Users/eumir/.rvm/gems/ruby-1.9.2-p180@kiseki/gems/cucumber-1.0.0/lib/cucumber/cli/main.rb:54:in `configuration'
/Users/eumir/.rvm/gems/ruby-1.9.2-p180@kiseki/gems/cucumber-1.0.0/lib/cucumber/cli/main.rb:62:in `run_drb_client'
/Users/eumir/.rvm/gems/ruby-1.9.2-p180@kiseki/gems/cucumber-1.0.0/lib/cucumber/cli/main.rb:34:in `execute!'
/Users/eumir/.rvm/gems/ruby-1.9.2-p180@kiseki/gems/spork-0.8.5/lib/spork/test_framework/cucumber.rb:22:in `run_tests'
/Users/eumir/.rvm/gems/ruby-1.9.2-p180@kiseki/gems/spork-0.8.5/lib/spork/run_strategy/forking.rb:13:in `block in run'
/Users/eumir/.rvm/gems/ruby-1.9.2-p180@kiseki/gems/spork-0.8.5/lib/spork/forker.rb:21:in `block in initialize'
/Users/eumir/.rvm/gems/ruby-1.9.2-p180@kiseki/gems/spork-0.8.5/lib/spork/forker.rb:18:in `fork'
/Users/eumir/.rvm/gems/ruby-1.9.2-p180@kiseki/gems/spork-0.8.5/lib/spork/forker.rb:18:in `initialize'
/Users/eumir/.rvm/gems/ruby-1.9.2-p180@kiseki/gems/spork-0.8.5/lib/spork/run_strategy/forking.rb:9:in `new'
/Users/eumir/.rvm/gems/ruby-1.9.2-p180@kiseki/gems/spork-0.8.5/lib/spork/run_strategy/forking.rb:9:in `run'
/Users/eumir/.rvm/gems/ruby-1.9.2-p180@kiseki/gems/spork-0.8.5/lib/spork/server.rb:47:in `run'
/Users/eumir/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/drb/drb.rb:1558:in `perform_without_block'
/Users/eumir/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/drb/drb.rb:1518:in `perform'
/Users/eumir/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/drb/drb.rb:1592:in `block (2 levels) in main_loop'
/Users/eumir/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/drb/drb.rb:1588:in `loop'
/Users/eumir/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/drb/drb.rb:1588:in `block in main_loop' true
Running spork cuc and cucumber in the command line doesn't give this error so I guess it's a path issue?
/opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in gem_original_require': no such file to load -- /Volumes/Macintosh HD/Users/christian/Projects/siteroot/.bundle/environment (LoadError) from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in
require' from /Volumes/Macintosh HD/Users/christian/Library/Application Support/TextMate/Bundles/Cucumber.tmbundle/Support/lib/cucumber/mate/../mate.rb:10 from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in gem_original_require' from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in
require' from /Volumes/Macintosh HD/Users/christian/Library/Application Support/TextMate/Bundles/Cucumber.tmbundle/Support/lib/cucumber/mate/feature_helper.rb:1 from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in gem_original_require' from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in
require' from /tmp/cucumber-9776.rb:2
bundle installed in TextMate (v 1.5.8) in Mac OS X 10.6.4 . using rvm for Rails3 pre
ruby -v : ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.4.0]
rails -version : Rails 3.0.0.beta4
TextMate > Bundles > Cucumber > Run Feature
---- error in open window ---
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require': no such file to load -- /Users/yves/Developpement/Projects/isabelle/blog/.bundle/environment (LoadError) from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
require' from /Users/yves/Library/Application Support/TextMate/Bundles/Cucumber.tmbundle/Support/lib/cucumber/mate/../mate.rb:10 from /Users/yves/Library/Application Support/TextMate/Bundles/Cucumber.tmbundle/Support/lib/cucumber/mate/feature_helper.rb:1:in require' from /Users/yves/Library/Application Support/TextMate/Bundles/Cucumber.tmbundle/Support/lib/cucumber/mate/feature_helper.rb:1 from /tmp/cucumber-34506.rb:2:in
require' from /tmp/cucumber-34506.rb:2
--- current rails app Gemfile
source 'http://rubygems.org'
gem 'rails', '3.0.0.beta4'
gem 'mongo'
gem 'mongo_ext'
gem "mongoid", "2.0.0.beta7"
gem 'bson'
gem "bson_ext", "1.0.1"
gem "devise", :git => "git://github.com/plataformatec/devise.git"
gem 'ruby-debug'
gem 'capybara'
gem 'database_cleaner'
gem 'cucumber-rails'
gem 'cucumber', '0.8.3'
gem 'rspec-rails', '2.0.0.beta.12'
gem 'spork'
gem 'launchy'
gem 'machinist_mongo', :require => 'machinist/mongoid'
Small improvement suggestion: using cmd + / to comment in a .feature file would be nice.
Attempting to go through the install on OSX 10.9.5.
The osascript portion of the install throws an error, maybe no longer supported;
$ osascript -e 'tell app "TextMate" to reload bundles'
23:37: syntax error: A identifier can’t go after this identifier. (-2740)
Found a similar issue with someone's Cucumber bundle;
http://stackoverflow.com/questions/8930984/error-running-osascript-e-tell-app-textmate-to-reload-bundles
The answer provides another working solution to this last step;
If you double-click on the *.tmbundle file, TextMate will ask whether you want to install the Bundle. You no longer have to copy the file into the Library directory.
The bold text below does not link to correct documentation.
If you are using RVM you can set up TextMate to use your RVM settings (read your .rvmrc file) by following these instructions.
They are pointing to http://beginrescueend.com and http://beginrescueend.com/integration/textmate/
which goes to some shopping website (http://elizamagazine.com/)
I have installed spork and followed the instructions. Works great in general and also with RSpec + bundle. All is well except for one strange problem. I created a textmate profile in cucumber.yml and setup the TM_CUCUMBER_OPTS to point to it. I added --drb to the profile and I can see it is using spork as intended HOWEVER the step texts that appear after Given/When/Then are gone and down as a single # character. When I remove --drb and cucumber default to local everything is shown correctly. Anyone seen this or has an idea how to fix?
Not sure what to do here. I've been investigating this issue for a while and I can't quite understand why it's not finding the bundler gem. Below is the error I get:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require': no such file to load -- bundler (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
require'
from /Users/tnypxl/Library/Application Support/Avian/Bundles/Cucumber.tmbundle/Support/lib/cucumber/mate/../mate.rb:9
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
require'
from /Users/tnypxl/Library/Application Support/Avian/Bundles/Cucumber.tmbundle/Support/lib/cucumber/mate/feature_helper.rb:1
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
require'
from Autocomplete Step:3
Hi there,
Not sure if this is an issue with the bundle itself, or a broader textmate issue, but when you have an apostrophy in a step the syntax highlighting is messed up for the remainder of the steps file.
For example:
Given /^I'm on the "([^\"]*)" homepage$/ do |page|
...
end
causes all the text after the ' in I'm to be highlighted as quoted text.
If I have the cursor in front of my defined feature, and enter
'Cntrl + r'
I get the following output:
C:\Program Files\e\Bundles\Cucumber.tmbundle\Support\lib\cucumber\mate\runner.rb:62:in chdir': can't convert nil into String (TypeError) from C:\Program Files\e\Bundles\Cucumber.tmbundle\Support \lib\cucumber\mate\runner.rb:62:in
in_project_dir' from C:\Program Files\e\Bundles\Cucumber.tmbundle\Support\lib\cucumber\mate\runner.rb:51:in run' from C:\Program Files\e\Bundles\Cucumber.tmbundle\Support\lib\cucumber\mate\runner.rb:28:in
run_feature' from /tmp/cucumber-7940.rb:5
The offending line in runner.rb is:
Dir.chdir(@project_directory, &block)
The instance variable @project_directory is set in initialize:
module Cucumber
module Mate
class Runner
def initialize(output, project_directory, full_file_path, cucumber_bin = nil, cucumber_opts=nil)
@project_directory = project_directory
...evidently above not happening.
Cheers,
Jet
Trying to run tests with Textmate 2, I'm getting following error:
cucumber-tmbundle/support/lib/cucumber/mate/text_mate_helper.rb:1:in `require': cannot load such file -- /Applications/TextMate.app/Contents/SharedSupport/Support/lib/textmate (LoadError)
Any ideas?
I am learning Rspec and cucumber and here is what I get when I run the feature. Where do I even start to figure out why its displaying those attr_value tags all over? I apologize if this is NOT the place to ask this :).
<_attr_value>duration id="#">
<_attr_value>expand-collapse id="#">
<_attr_value>expander id="#">Expand All
<_attr_value>collapser id="#">Collapse All
<_attr_value>val class="#">Feature: Greeter says hello
<_attr_value>narrative class="#">In order to start learning Rspec and Cucumber
As a reader of this book
I want a greeter to say Hello
<_attr_value>scenario_file class="#">/Users/andrewmcelroy/Development/other/learning/rspec_book/hello/3/features/greeter_says_hello.feature:6
<_attr_value>scenario_1 id="#"><_attr_value>keyword class="#">Scenario: <_attr_value>val class="#">greeter says Hello
<_attr_value>step_name class="#"><_attr_value>keyword class="#">Given <_attr_value>step val class="#">a greeter
<_attr_value>step_file class="#">/Users/andrewmcelroy/Development/other/learning/rspec_book/hello/3/features/greeter_says_hello.feature:7
Given /^a greeter$/ do
pending # express the regexp above with the code you wish you had
end
<_attr_value>step_name class="#"><_attr_value>keyword class="#">When <_attr_value>step val class="#">I send it the greet message
<_attr_value>step_file class="#">/Users/andrewmcelroy/Development/other/learning/rspec_book/hello/3/features/greeter_says_hello.feature:8
When /^I send it the greet message$/ do
pending # express the regexp above with the code you wish you had
end
<_attr_value>step_name class="#"><_attr_value>keyword class="#">Then <_attr_value>step val class="#">I should see "Hello Cucumber!"
<_attr_value>step_file class="#">/Users/andrewmcelroy/Development/other/learning/rspec_book/hello/3/features/greeter_says_hello.feature:9
The snippet that creates a feature should not spit out all that In order to ... nonsense
, it just confuses people.
See http://blog.mattwynne.net/2010/10/22/features-user-stories/
Hello.
Any chanse to update this tmBundle to new gherkin grammar?
This repo is submoduled to Github linguist project, so it provides the syntax highlighting rules to Github itself.
/cc @aslakhellesoy
Apologies: Don't know how to submit this other than creating an issue.
This is a TM command which snarfs the [WT]hen|Given|And|But lines from all the step definition files and presents them as a tool tip:
beforeRunningCommand nop command echo 'Phrases Recognized in step_definitions/_.rb' echo '-------------------------------------------' egrep '^\s_([TW]hen|Given|And|But)' ${TM_PROJECT_DIRECTORY}/features/step_definitions/_.rb | sed -e 's| do._$||' | sort input none keyEquivalent ^h name Show web_steps output showAsTooltip scope text.gherkin.feature, source.ruby.rspec.cucumber.steps uuid BA0E41CA-589F-454A-B1FC-49AF1CE6D0DBWhen doing command R, I get an alert sheet with the following message, but not sure where to begin checking for the issue here....
/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:54:in require': cannot load such file -- spec (LoadError) from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:54:in
require'
from /Users/john.joyce/Library/Application Support/TextMate/Managed/Bundles/Cucumber.tmbundle/Support/lib/cucumber/mate.rb:31:in rescue in <top (required)>' from /Users/john.joyce/Library/Application Support/TextMate/Managed/Bundles/Cucumber.tmbundle/Support/lib/cucumber/mate.rb:28:in
<top (required)>'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:54:in require' from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:54:in
require'
from /Users/john.joyce/Library/Application Support/TextMate/Managed/Bundles/Cucumber.tmbundle/Support/lib/cucumber/mate/feature_helper.rb:1:in <top (required)>' from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:54:in
require'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:54:in require' from /tmp/cucumber-6666.rb:2:in
Please rename it to Support otherwise textmate will not place the support path into $TM_BUNDLE_SUPPORT and some command will not work ( like align table cell )
It will aways use the global gemset.
It should load the .rvmrc file before running commands.
In my step definitions, the color highlighting get broken due to the second double quote in this
"([^"]*)"
I copied the definition from the terminal. And when I replace the double quotes around that with single quotes to "fix" them, then cucumber complains that I haven't implemented that step yet.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in /bin/bash: -c: line 0: unexpected EOF while looking for matching '' /bin/bash: -c: line 2: syntax error: unexpected end of filerequire' from /Users/<user>/Library/Application Support/TextMate/Bundles/Cucumber.tmbundle/Support/lib/cucumber/mate/../mate.rb:31 from /Users/<user>/Library/Application Support/TextMate/Bundles/Cucumber.tmbundle/Support/lib/cucumber/mate/feature_helper.rb:1:in /bin/bash: -c: line 0: unexpected EOF while looking for matching
''
/bin/bash: -c: line 3: syntax error: unexpected end of filerequire'
from /tmp/temp_textmate.jdaUjR:3
I tried putting the bundle in both suggested folder
~/Library/Application\ Support/TextMate/Bundles/
~/Library/Application\ Support/Avian/Bundles/
I am getting the same error.
23:37: syntax error: A identifier can’t go after this identifier. (-2740)
If I have an empty feature file and type 'fea' then hit tab, no feature completion takes place.
If I pull up the feature snippet from the bundle menu, it properly inserts the code.
it looks like the tab trigger has a scope of text.gherkin.feature, but I do not understand how this gets set/how scope is determined.
Thanks!
When i have a feature using Given and And, creating all undefined steps creates the "And"-Step as "Then"-Step.
Hi
I was having problems running a single cucumber scenario with CMD+SHIFT+R, because it was trying to run RSpec's 'single example', even though textmate had "Cucumber Steps" selected at the bottom.
The fix was to go into the bundle editor, then Cucumber -> "Run Single Scenario", and change
text.gherkin.feature
to
text.gherkin.feature, source.ruby.rspec.cucumber.steps
in the "Scope Selector" box.
Not sure if that's affected anyone else
Mark
As per the recent pull request - if you only require .bundle/environment.rb if it is present, the cucumber tmbundle can work with bundler 1.0.
Scenario keywords (given, when, then, etc) get highlighted when they appear in the narrative, is this intended?
This expression is wrong: /([\s\t](?:given|when|then|and|but)\s+)(.)/i)
The [\s\t]* should just be \s*. \s includes tabs.
I organized my features folder like the suggestion on the Cucumber site:
features
-step_definitions
--web_steps
-views
--home_page.features
--step_definitions
---home_page_steps.rb
It works are the bash prompt (OSX) but not via the cucumber.tmbundle.
If I flatten out the directories like so, then it works fine in TM.
features
-home_page.features
-step_definitions
--home_page_steps.rb
--web_steps
Using:
cucumber (0.8.3)
cucumber-rails (0.3.2)
rspec (2.0.0.beta.14, 1.3.0)
rspec-core (2.0.0.beta.14)
rspec-expectations (2.0.0.beta.14)
rspec-mocks (2.0.0.beta.14)
rspec-rails (2.0.0.beta.14.2, 1.3.0)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.