Automatically installs EarlGrey. Supports carthage, cocoapods, and Swift.
$ earlgrey help install Usage: earlgrey install -t, --target=TARGET Options: -p, [--project=PROJECT] # Project -t, --target=TARGET # EarlGrey -s, [--scheme=SCHEME] # EarlGrey.xcscheme [--carthage], [--no-carthage] # Default: true [--swift], [--no-swift] # Default: true [--swift-version] # Default: 3.0 # Supported Values: 2.3, 3.0. Installs EarlGrey into an Xcode unit test target
Create new Target iOS Unit Testing Bundle
then add a new scheme Product → Scheme → Manage Schemes
and mark it as shared. See EarlGrey docs for screenshots
Now run the install command with the test target name:
earlgrey install -t AutoEarlGrey
See the example project which defines AutoEarlGrey
.
The gem uses Rake to define common tasks. The tests are run with rake spec
. By default rake
will run spec
, rubocop
, and warn
.
$ rake -T rake build # Build the earlgrey gem into the pkg directory rake clean # Remove any temporary products rake clobber # Remove any generated files rake install # Build and install earlgrey gem into system gems rake install:local # Build and install earlgrey gem into system gems without network access rake release[remote] # Create a version tag and build and push earlgrey gem to Rubygems rake rubocop # Run RuboCop rake rubocop:auto_correct # Auto-correct RuboCop offenses rake spec # Run RSpec code examples rake warn # Check for warnings
The install command does the following by default:
-- Adds EarlGrey.swift to test target