test/deadweight_test.rb in aanand-deadweight-0.0.3 vs test/deadweight_test.rb in aanand-deadweight-0.1.0
- old
+ new
@@ -39,6 +39,22 @@
agent.page.links.first.click
}
assert @dw.run.empty?
end
+
+ should "accept IO objects as targets" do
+ @dw.pages << File.new(File.dirname(__FILE__) + '/fixtures/index2.html')
+
+ assert @dw.run.empty?
+ end
+
+ should "allow individual CSS rules to be appended" do
+ @dw.rules = ".something { display: block; }"
+
+ assert @dw.run.include?(".something")
+ end
+
+ should 'provide the results of its last run with #unused_selectors' do
+ assert_equal @result, @dw.unused_selectors
+ end
end