Skip to content

Commit 4af8637

Browse files
committed
Fix errors in the simple_script example
1 parent 169108b commit 4af8637

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ before_install:
3434
- bundle install
3535
install:
3636
- bazel $BAZEL_OPTS build $BAZEL_BUILD_OPTS --show_progress_rate_limit 0 -- //...
37-
- (cd examples && bazel $BAZEL_OPTS build $BAZEL_BUILD_OPTS --show_progress_rate_limit 0 -- //...)
37+
- (cd examples/simple_script && bazel $BAZEL_OPTS build $BAZEL_BUILD_OPTS --show_progress_rate_limit 0 -- //...)
3838
script:
3939
- bazel $BAZEL_OPTS test $BAZEL_BUILD_OPTS --show_progress_rate_limit 0 --test_output=streamed -- //...
40-
- (cd examples && bazel $BAZEL_OPTS test $BAZEL_BUILD_OPTS --show_progress_rate_limit 0 --test_output=streamed -- //...)
40+
- (cd examples/simple_script && bazel $BAZEL_OPTS test $BAZEL_BUILD_OPTS --show_progress_rate_limit 0 --test_output=streamed -- //...)
4141
# If this fails run `bazel run :buildifier`
4242
- bazel run :buildifier-check
4343
# If this fails run `bundle exec rubocop -a`

examples/simple_script/.rspec

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/simple_script/BUILD

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ ruby_binary(
1717
)
1818

1919
ruby_test(
20-
name = "default_test",
21-
srcs = ["script_spec.rb"],
22-
main = "script_spec.rb",
20+
name = "script_spec",
21+
srcs = [
22+
"script.rb",
23+
"spec/script_spec.rb",
24+
],
25+
main = "spec/script_spec.rb",
2326
rubyopt = ["-rrspec/autorun"], # require autorun because it is needed
2427
deps = [
2528
"//lib:foo",

examples/simple_script/script_spec.rb renamed to examples/simple_script/spec/script_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232

3333
require_relative '../script'
3434

35-
describe OSSRand do
36-
it begin
37-
expect(oss_rand).to be String
35+
describe 'oss_rand' do
36+
it 'generates a String' do
37+
expect(oss_rand).to be_a_kind_of String
3838
end
3939
end

0 commit comments

Comments
 (0)