Skip to content

Commit

Permalink
Add first Aruba feature
Browse files Browse the repository at this point in the history
  • Loading branch information
rossmeissl committed Mar 8, 2011
1 parent 4472e61 commit a01de02
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 37 deletions.
10 changes: 1 addition & 9 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,2 @@
source "http://rubygems.org"
# Add dependencies required to use your gem here.
# Example:
# gem "activesupport", ">= 2.3.5"

# Add dependencies to develop your gem here.
# Include everything needed to run rake, tests, features, etc.
group :development do
gem "jeweler", "~> 1.5.2"
end
gemspec
13 changes: 4 additions & 9 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,10 @@ Jeweler::Tasks.new do |gem|
gem.description = %Q{Give your application or gem an interactive shell, complete with custom prompts, tab completion, and various callbacks. Commands are defined as Ruby methods and can be grouped into logical subshells.}
gem.email = "[email protected]"
gem.authors = ["Andy Rossmeissl"]
gem.add_development_dependency 'aruba', '~> 0.3.2'
end
Jeweler::RubygemsDotOrgTasks.new

require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
version = File.exist?('VERSION') ? File.read('VERSION') : ""

rdoc.rdoc_dir = 'rdoc'
rdoc.title = "bombshell #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
require 'cucumber/rake/task'
Cucumber::Rake::Task.new
task :default => :cucumber
3 changes: 3 additions & 0 deletions bombshell.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,14 @@ Gem::Specification.new do |s|

if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
s.add_development_dependency(%q<aruba>, ["~> 0.3.2"])
else
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
s.add_dependency(%q<aruba>, ["~> 0.3.2"])
end
else
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
s.add_dependency(%q<aruba>, ["~> 0.3.2"])
end
end

23 changes: 23 additions & 0 deletions features/shell.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Feature: Custom shell

In order to allow my users to explore my library
As a Ruby library developer
I want to give them an interactive shell

Scenario: Running the shell
Given a file named "fooshell.rb" with:
"""
require 'bombshell'
module Foo
class Shell < Bombshell::Environment
include Bombshell::Shell
end
end
Bombshell.launch Foo::Shell
"""
When I run "ruby fooshell.rb" interactively
And I type "quit"
Then the output should contain:
"""
[Bombshell]
"""
10 changes: 10 additions & 0 deletions features/support/env.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')
require 'aruba/cucumber'
require 'fileutils'
require 'rspec/expectations'
require 'bombshell'

Before do
@aruba_io_wait_seconds = 1
@dirs = [File.join(ENV['HOME'], 'bombshell_features')]
end
7 changes: 0 additions & 7 deletions spec/bombshell_spec.rb

This file was deleted.

12 changes: 0 additions & 12 deletions spec/spec_helper.rb

This file was deleted.

0 comments on commit a01de02

Please sign in to comment.