Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show hint to remove the app you just installed
added rspec tests few tweaks
- Loading branch information
1 parent
22a5202
commit 0a5fd27
Showing
13 changed files
with
150 additions
and
29 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--require spec_helper | ||
--tty | ||
--color | ||
--format documentation | ||
--format html -o "tmp/rspec_result.html" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
language: ruby | ||
rvm: | ||
- 1.9.3 | ||
- 2.2.1 | ||
before_install: gem install bundler -v 1.10.6 |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
require "bundler/gem_tasks" | ||
|
||
require 'rspec/core/rake_task' | ||
|
||
# Default directory to look in is `/specs` | ||
# Run with `rake spec` | ||
RSpec::Core::RakeTask.new(:spec) do |task| | ||
task.rspec_opts = ['--color', '--format', 'nested'] | ||
end | ||
|
||
task :default => :spec |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module DryRun | ||
VERSION = "0.2.2" | ||
VERSION = "0.3.1" | ||
end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
require 'spec_helper' | ||
require 'pry' | ||
require 'dryrun/android_project' | ||
|
||
|
||
# RSpec.describe "something" do | ||
# context "in one context" do | ||
# it "does one thing" do | ||
# end | ||
# end | ||
# context "in another context" do | ||
# it "does another thing" do | ||
# end | ||
# end | ||
# end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
require 'spec_helper' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
require 'spec_helper' | ||
require 'pry' | ||
require 'dryrun/github' | ||
|
||
|
||
describe '#github' do | ||
|
||
context 'when given github url\'s' do | ||
|
||
it 'is a regular url' do | ||
url="https://github.com/cesarferreira/android-helloworld" | ||
github = DryRun::Github.new(url) | ||
expected = "https://github.com/cesarferreira/android-helloworld.git" | ||
expect(github.clonable_url == expected).to be true | ||
end | ||
|
||
|
||
it 'ends in .git' do | ||
url = 'https://github.com/googlesamples/google-services.git' | ||
github = DryRun::Github.new(url) | ||
expected = 'https://github.com/googlesamples/google-services.git' | ||
expect(github.clonable_url == expected).to be true | ||
end | ||
|
||
|
||
it 'is from ssh' do | ||
url = 'git@github.com:cesarferreira/android-helloworld.git' | ||
github = DryRun::Github.new(url) | ||
expected = 'git@github.com:cesarferreira/android-helloworld.git' | ||
expect(github.clonable_url == expected).to be true | ||
end | ||
end | ||
|
||
|
||
context 'when needing a destination to clone the project' do | ||
it 'is a regular url' do | ||
url = 'https://github.com/cesarferreira/android-helloworld' | ||
github = DryRun::Github.new(url) | ||
expected = 'cesarferreira/android-helloworld' | ||
expect(github.get_destination == expected).to be true | ||
end | ||
|
||
it 'ends in .git' do | ||
url = 'https://github.com/googlesamples/google-services.git' | ||
github = DryRun::Github.new(url) | ||
expected = 'googlesamples/google-services' | ||
expect(github.get_destination == expected).to be true | ||
end | ||
end | ||
|
||
|
||
end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
require 'dryrun' | ||
|
||
RSpec.configure do |config| | ||
# rspec-expectations config goes here. You can use an alternate | ||
# assertion/expectation library such as wrong or the stdlib/minitest | ||
# assertions if you prefer. | ||
config.expect_with :rspec do |expectations| | ||
# This option will default to `true` in RSpec 4. It makes the `description` | ||
# and `failure_message` of custom matchers include text for helper methods | ||
# defined using `chain`, e.g.: | ||
# be_bigger_than(2).and_smaller_than(4).description | ||
# # => "be bigger than 2 and smaller than 4" | ||
# ...rather than: | ||
# # => "be bigger than 2" | ||
expectations.include_chain_clauses_in_custom_matcher_descriptions = true | ||
end | ||
|
||
# rspec-mocks config goes here. You can use an alternate test double | ||
# library (such as bogus or mocha) by changing the `mock_with` option here. | ||
config.mock_with :rspec do |mocks| | ||
# Prevents you from mocking or stubbing a method that does not exist on | ||
# a real object. This is generally recommended, and will default to | ||
# `true` in RSpec 4. | ||
mocks.verify_partial_doubles = true | ||
end | ||
|
||
end |