Sha256: 9929338706c15f840aaf535fd8ba743f21c05f74b8d8fc19c5ba685736dbea00

Contents?: true

Size: 670 Bytes

Versions: 4

Compression:

Stored size: 670 Bytes

Contents

require "irbtools/commands"

describe "irbtools commands" do
  describe "[introspection]" do
    describe "howtocall / code" do
      it "support ri Syntax like String.name or String#gsub" do
        expect(
          IRB::Command::Howtocall.transform_args("String.name")
        ).to eq "String, :name"

        expect(
          IRB::Command::Code.transform_args("String#gsub")
        ).to eq "String, String.instance_method(:gsub)"
      end

      it "supports question-mark methods" do
        expect(
          IRB::Command::Howtocall.transform_args("String#ascii_only?")
        ).to eq "String, String.instance_method(:ascii_only?)"
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
irbtools-4.0.11 spec/irbtools_commands_spec.rb
irbtools-4.0.10 spec/irbtools_commands_spec.rb
irbtools-4.0.9 spec/irbtools_commands_spec.rb
irbtools-4.0.8 spec/irbtools_commands_spec.rb