Skip to content

Commit

Permalink
Skip testing invalid type when RBS is loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
ntkme committed Feb 17, 2024
1 parent 8205760 commit f43f8ef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec/sass_compile_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,10 @@
end

it 'throws an error for an unrecognized style' do
skip 'RBS::Test::Tester is loaded' if defined?(RBS::Test::Tester)

expect { described_class.compile_string('a {b: c}', style: 'unrecognized style') }
.to raise_error(defined?(RBS::Test::Tester::TypeError) ? RBS::Test::Tester::TypeError : ArgumentError)
.to raise_error(ArgumentError)
end

it "doesn't throw a Sass exception for an argument error" do
Expand Down
4 changes: 4 additions & 0 deletions spec/sass_function_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@
end

it 'not returning' do
skip 'RBS::Test::Tester is loaded' if defined?(RBS::Test::Tester)

expect do
described_class.compile_string(
'a {b: foo()}',
Expand All @@ -110,6 +112,8 @@

describe 'returning a non-Value' do
it 'directly' do
skip 'RBS::Test::Tester is loaded' if defined?(RBS::Test::Tester)

expect do
described_class.compile_string(
'a {b: foo()}',
Expand Down

0 comments on commit f43f8ef

Please sign in to comment.