vim-rhubarb icon indicating copy to clipboard operation
vim-rhubarb copied to clipboard

Support line ranges for commit URLs

Open odnoletkov opened this issue 6 years ago • 4 comments
trafficstars

Anchor format is

#diff-<MD5 of path>[L|R]<line number>

With L line number is relative to the --- side, with R to the +++ side. Path of the +++ side used when it exists, otherwise path of the --- side (for removals).

odnoletkov avatar Jan 11 '19 22:01 odnoletkov

I'm out of the loop on this. What's the naming scheme? What should the template look like?

Based on precedent, we probably want to further overload this onto :Eintegrationtest.

tpope avatar Mar 06 '22 21:03 tpope

naming scheme is spec/system/widget_system_spec.rb

template is:

require "rails_helper"

RSpec.describe "Widget management", :type => :system do
  before do
    driven_by(:rack_test)
  end

  it "enables me to create widgets" do
    visit "/widgets/new"

    fill_in "Name", :with => "My Widget"
    click_button "Create Widget"

    expect(page).to have_text("Widget was successfully created.")
  end
end

From https://relishapp.com/rspec/rspec-rails/docs/system-specs/system-spec

chrislawrence avatar Mar 11 '22 02:03 chrislawrence

Probably adding another section like this will be sufficient:

https://github.com/tpope/vim-rails/blob/de73f6d1b0bf1b2af2d576f3420fc861af14769f/autoload/rails.vim#L4430-L4438

For templates we strive for the smallest possible, no example tests or anything like that. One can use the generator to get those.

tpope avatar Mar 11 '22 19:03 tpope