spec/handlers/module_handler_spec.rb in yard-0.8.7.6 vs spec/handlers/module_handler_spec.rb in yard-0.9.0
- old
+ new
@@ -1,34 +1,34 @@
require File.dirname(__FILE__) + '/spec_helper'
describe "YARD::Handlers::Ruby::#{LEGACY_PARSER ? "Legacy::" : ""}ModuleHandler" do
before(:all) { parse_file :module_handler_001, __FILE__ }
- it "should parse a module block" do
- Registry.at(:ModName).should_not == nil
- Registry.at("ModName::OtherModName").should_not == nil
+ it "parses a module block" do
+ expect(Registry.at(:ModName)).not_to eq nil
+ expect(Registry.at("ModName::OtherModName")).not_to eq nil
end
- it "should attach docstring" do
- Registry.at("ModName::OtherModName").docstring.should == "Docstring"
+ it "attaches docstring" do
+ expect(Registry.at("ModName::OtherModName").docstring).to eq "Docstring"
end
- it "should handle any formatting" do
- Registry.at(:StressTest).should_not == nil
+ it "handles any formatting" do
+ expect(Registry.at(:StressTest)).not_to eq nil
end
- it "should handle complex module names" do
- Registry.at("A::B").should_not == nil
+ it "handles complex module names" do
+ expect(Registry.at("A::B")).not_to eq nil
end
- it "should handle modules in the form ::ModName" do
- Registry.at("Kernel").should_not be_nil
+ it "handles modules in the form ::ModName" do
+ expect(Registry.at("Kernel")).not_to be nil
end
- it "should list mixins in proper order" do
- Registry.at('D').mixins.should == [P(:C), P(:B), P(:A)]
+ it "lists mixins in proper order" do
+ expect(Registry.at('D').mixins).to eq [P(:C), P(:B), P(:A)]
end
- it "should create proper module when constant is in namespace" do
- Registry.at('Q::FOO::A').should_not be_nil
+ it "creates proper module when constant is in namespace" do
+ expect(Registry.at('Q::FOO::A')).not_to be nil
end
end
\ No newline at end of file