This setup looks like it should be done outside of the spec, which would make it easier to reuse. Eg,

```ruby
let(:table) { PgShrink::Table.new(:test_table) }

context 'when a filter is specified' do
  before(:each) do
    table.filter_by { |test| !!test[:u] }
  end

  it 'adds the filter to the list of filters' do
    expect(table.filters.size).to eq(1)
  end

  it 'passes the block to the table filters'
  it 'returns a subset of records'

  context 'when a record is locked' do
    before(:each) do
      table.lock { |test| !!test[:lock] }
    end

    it 'does not filter that record'
  end
end
```