Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not change or generate README.md after running rspec #8629

Merged
merged 6 commits into from
Apr 1, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions fastlane/spec/cli_tools_distributor_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
expect do
Fastlane::CLIToolsDistributor.take_off
end.to raise_error(SystemExit)

`git checkout fastlane/README.md`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems like a hack, can we just not generate the file in the first place instead?

end
end
end
7 changes: 6 additions & 1 deletion fastlane/spec/commands_generator_spec.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
require 'fastlane/commands_generator'

fastlane_folder = File.absolute_path('./fastlane/spec/fixtures/dotenvs/withFastfiles/parentonly/fastlane')

describe Fastlane::CommandsGenerator do
before(:each) do
ENV['DOTENV'] = nil
fastlane_folder = File.absolute_path('./fastlane/spec/fixtures/dotenvs/withFastfiles/parentonly/fastlane')
allow(FastlaneCore::FastlaneFolder).to receive(:path).and_return(fastlane_folder)
end

after(:all) do
FileUtils.rm(File.join(fastlane_folder, 'README.md'))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

end

describe ":trigger option handling" do
it "can use the env flag from tool options" do
stub_commander_runner_args(['command_test', '--env', 'DOTENV'])
Expand Down
8 changes: 7 additions & 1 deletion fastlane/spec/lane_manager_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
fastlane_folder = File.absolute_path('./fastlane/spec/fixtures/fastfiles/')

describe Fastlane do
describe Fastlane::LaneManager do
describe "#init" do
Expand Down Expand Up @@ -70,7 +72,11 @@ def ensure_dot_env_value_from_folders(folders, envs, expected_values)

describe "successfull init" do
before do
allow(FastlaneCore::FastlaneFolder).to receive(:path).and_return(File.absolute_path('./fastlane/spec/fixtures/fastfiles/'))
allow(FastlaneCore::FastlaneFolder).to receive(:path).and_return(fastlane_folder)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

end

after(:all) do
FileUtils.rm(File.join(fastlane_folder, 'README.md'))
end

it "Successfully collected all actions" do
Expand Down