Skip to content

Commit

Permalink
Remove redundant specs from the linter.
Browse files Browse the repository at this point in the history
Porting over the last of the linter specs that are now used by the
analyzer over.
  • Loading branch information
joshkalpin committed Apr 1, 2014
1 parent b597fc1 commit ea328ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 49 deletions.
8 changes: 3 additions & 5 deletions spec/specification/linter/analyzer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,10 @@ def message_should_include(*values)
message_should_include('spec', 'empty')
end

xit "requires that the require_arc value is specified until the switch to a true default" do
# TODO the default value is invalidating this test
@consumer.requires_arc = nil
it "requires that the requires_arc value is specified explcitly until the switch to a true default" do
@spec.requires_arc = nil
@analyzer.analyze
message = @analyzer.results.first.message
message.should.include('`requires_arc` should be specified')
message_should_include('`requires_arc` should be specified')
end

it "checks if the pre install hook has been defined" do
Expand Down
44 changes: 0 additions & 44 deletions spec/specification/linter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -360,50 +360,6 @@ def message_should_include(*values)
message.should.include('Warnings')
message.should.include('disabled')
end

it "checks if any file patterns is absolute" do
@spec.source_files = '/Classes'
@linter.lint
message = @linter.results.first.message
message.should.include('patterns')
message.should.include('relative')
message.should.include('source_files')
end

it "checks if a specification is empty" do
consumer = Specification::Consumer
consumer.any_instance.stubs(:source_files).returns([])
consumer.any_instance.stubs(:resources).returns({})
consumer.any_instance.stubs(:preserve_paths).returns([])
consumer.any_instance.stubs(:subspecs).returns([])
consumer.any_instance.stubs(:dependencies).returns([])
consumer.any_instance.stubs(:vendored_libraries).returns([])
consumer.any_instance.stubs(:vendored_frameworks).returns([])
@linter.lint
message = @linter.results.first.message
message.should.include('spec is empty')
end

it "requires that the requires_arc value is specified explcitly until the switch to a true default" do
@spec.requires_arc = nil
@linter.lint
message = @linter.results.first.message
message.should.include('`requires_arc` should be specified')
end

it "checks if the pre install hook has been defined" do
@spec.pre_install do; end
@linter.lint
message = @linter.results.first.message
message.should.match /pre install hook.*deprecated/
end

it "checks if the post install hook has been defined" do
@spec.post_install do; end
@linter.lint
message = @linter.results.first.message
message.should.match /post install hook.*deprecated/
end
end
end
end

0 comments on commit ea328ea

Please sign in to comment.