Permalink
Browse files

Added CHANGELOG and sample rake task

  • Loading branch information...
1 parent 83a07ac commit 6baa09936bb34e7a4193faa8e50ab3955f4d4296 @blakewatters blakewatters committed Jul 16, 2010
Showing with 55 additions and 5 deletions.
  1. +8 −0 CHANGELOG
  2. +2 −1 README.md
  3. +1 −2 lib/uispecrunner/application.rb
  4. +5 −0 lib/uispecrunner/options.rb
  5. +35 −0 tasks/uispec.rake
  6. +4 −2 uispecrunner.gemspec
View
@@ -0,0 +1,8 @@
+v0.2.3
+-------
+- Added UISpecRunner::Options.from_file
+- Added rake task example.
+
+v0.2.2
+-------
+First public release.
View
@@ -24,13 +24,14 @@ them from Github.
- Support for reading configuration settings from
- A Ruby API for configuring your own spec runners
- Will read common arguments from uispec.opts file for easy per project configuration
+- Includes a sample Rakefile for running your UISpec's
## TODO
- Auto-detect SDK versions available
-- Rake file template
- Support for running specific files
- Support for running non-headless (either via AppleScript or iphonesim)
- Generate a Kicker script
+- Enabling Zombies (or other debugging flags, see http://code.google.com/p/google-toolbox-for-mac/source/browse/trunk/UnitTesting/RunIPhoneUnitTest.sh)
## Copyright
@@ -19,8 +19,7 @@ def self.run!(*arguments)
# Read standard arguments from uispec.opts
options_file = 'uispec.opts'
if File.exists?(options_file)
- option_file_args = File.readlines(options_file).map {|l| l.chomp.split " "}.flatten
- options = UISpecRunner::Options.new(option_file_args).merge(options)
+ options = UISpecRunner::Options.from_file(options_file).merge(options)
end
runner = UISpecRunner.new(options)
@@ -2,6 +2,11 @@ class UISpecRunner
class Options < Hash
attr_reader :opts, :orig_args
+ def self.from_file(options_file)
+ args = File.readlines(options_file).map {|l| l.chomp.split " "}.flatten
+ UISpecRunner::Options.new(args)
+ end
+
def initialize(args)
super()
View
@@ -0,0 +1,35 @@
+require 'rubygems'
+
+begin
+ gem 'uispecrunner'
+ require 'uispecrunner'
+ require 'uispecrunner/options'
+rescue LoadError => error
+ puts "Unable to load UISpecRunner: #{error}"
+end
+
+namespace :uispec do
+ desc "Run all specs"
+ task :all do
+ options = UISpecRunner::Options.from_file('uispec.opts') rescue {}
+ uispec_runner = UISpecRunner.new(options)
+ uispec_runner.run_all!
+ end
+
+ desc "Run all unit specs (those that implement UISpecUnit)"
+ task :units do
+ options = UISpecRunner::Options.from_file('uispec.opts') rescue {}
+ uispec_runner = UISpecRunner.new(options)
+ uispec_runner.run_protocol!('UISpecUnit')
+ end
+
+ desc "Run all integration specs (those that implement UISpecIntegration)"
+ task :integration do
+ options = UISpecRunner::Options.from_file('uispec.opts') rescue {}
+ uispec_runner = UISpecRunner.new(options)
+ uispec_runner.run_protocol!('UISpecIntegration')
+ end
+end
+
+desc "Run all specs"
+task :default => 'uispec:all'
View
@@ -5,11 +5,11 @@
Gem::Specification.new do |s|
s.name = %q{uispecrunner}
- s.version = "0.2.2"
+ s.version = "0.2.3"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Blake Watters"]
- s.date = %q{2010-07-15}
+ s.date = %q{2010-07-16}
s.default_executable = %q{uispec}
s.description = %q{Provides a simple Ruby interface for running UISpec iPhone tests}
s.email = %q{blake@twotoasters.com}
@@ -20,6 +20,7 @@ Gem::Specification.new do |s|
]
s.files = [
".gitignore",
+ "CHANGELOG",
"LICENSE",
"README.md",
"Rakefile",
@@ -35,6 +36,7 @@ Gem::Specification.new do |s|
"src/UISpec+UISpecRunner.h",
"src/UISpec+UISpecRunner.m",
"src/main.m",
+ "tasks/uispec.rake",
"uispecrunner.gemspec"
]
s.homepage = %q{http://github.com/twotoasters/UISpecRunner}

0 comments on commit 6baa099

Please sign in to comment.