Sha256: c54293a7eb45e2951f12eb93aa406b5066ce8298d9a0b4881115babb488cc091
Contents?: true
Size: 1.41 KB
Versions: 15
Compression:
Stored size: 1.41 KB
Contents
require 'spec_helper' module Editor describe Xcode do it { should respond_to :current_path } it { should respond_to :name } pending(:name) { should_not raise_error NotImplementedError } it { should respond_to :version } pending(:version) { should_not raise_error NotImplementedError } describe "#is_running?" do it { should respond_to :is_running? } it "should return wether Xcode is running or not" do app = mock() app.expects(:is_running?).returns(true).once Xcode.any_instance.stubs(:editor).returns(app) subject.is_running?.should be_true end it "should return the current_path if textmate running" do app = mock() app.expects(:is_running?).returns(true).once documents = mock document = mock path = mock path.expects(:get).returns('/path/to/file.rb') document.expects(:path).returns(path).once documents.expects(:get).returns([document]).once app.expects(:document).returns(documents).once Xcode.any_instance.stubs(:editor).returns(app) subject.current_path.should == '/path/to/file.rb' end it "should return nil if textmate ain't running" do app = mock() app.expects(:is_running?).returns(false).once Xcode.any_instance.stubs(:editor).returns(app) subject.current_path.should be_nil end end end end
Version data entries
15 entries across 15 versions & 1 rubygems